Changeset 2215
- Timestamp:
- 06/07/08 11:46:12 (6 months ago)
- Files:
-
- trunk/framework-plugin/src/com/tresys/framework/compiler/FNetGenerator.java (modified) (2 diffs)
- trunk/framework-plugin/src/com/tresys/framework/compiler/linkage/net/Endpoint.java (modified) (2 diffs, 1 prop)
- trunk/framework-plugin/src/com/tresys/framework/compiler/linkage/net/FNETParser.jj (modified) (6 diffs, 1 prop)
- trunk/framework-plugin/src/com/tresys/framework/compiler/linkage/net/NetConnection.java (modified) (1 diff)
- trunk/framework-plugin/src/com/tresys/framework/compiler/linkage/net/NetItem.java (modified) (2 diffs, 1 prop)
- trunk/framework-plugin/src/com/tresys/framework/compiler/linkage/net/NetworkConfig.java (modified) (3 diffs, 1 prop)
- trunk/framework-plugin/src/com/tresys/framework/compiler/policy/SystemResourceValidator.java (modified) (1 diff)
- trunk/framework-plugin/src/com/tresys/framework/compiler/systemResources/NetworkInfo.java (modified) (1 diff)
- trunk/framework-plugin/src/com/tresys/framework/compiler/systemResources/SystemResourcesParser.jj (modified) (1 diff)
- trunk/framework-plugin/src/com/tresys/framework/plugin/builder/ENetworkConfig.java (modified) (4 diffs)
- trunk/framework-plugin/src/com/tresys/framework/plugin/builder/SELinuxSystem.java (modified) (2 diffs)
- trunk/framework-plugin/src/com/tresys/framework/plugin/editor/policy/graphic/model/NetworkResourceShape.java (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/framework-plugin/src/com/tresys/framework/compiler/FNetGenerator.java
r2199 r2215 112 112 113 113 mData.append ("networkresource "); 114 mData.append (name).append (" { ");114 mData.append (name).append (" { "); 115 115 116 116 if (type != null) … … 146 146 147 147 } 148 149 public String toString ()150 {151 return mSystems.append (mData).toString ();152 }153 154 148 } trunk/framework-plugin/src/com/tresys/framework/compiler/linkage/net/Endpoint.java
- Property svn:keywords changed from Date Revision to Date Rev
r2192 r2215 5 5 |*| Author: Dave Sugar <dsugar@tresys.com> 6 6 |*| 7 |*| $Date :2008-05-12 13:08:06 -0400 (Mon, 12 May 2008)$8 |*| $Rev :2113$7 |*| $Date$ 8 |*| $Rev$ 9 9 \*/ 10 10 … … 65 65 return m_netInfo; 66 66 } 67 68 67 69 68 public NetSystem getSystem () trunk/framework-plugin/src/com/tresys/framework/compiler/linkage/net/FNETParser.jj
- Property svn:keywords set to Date Rev
r2164 r2215 16 16 |*| License: refer to COPYING file for license information. 17 17 |*| Authors: Dave Sugar <dsugar@tresys.com> 18 |*| $Rev $19 |*| $Date $18 |*| $Rev: $ 19 |*| $Date: $ 20 20 \*/ 21 21 … … 295 295 Token connection; 296 296 Token esp; 297 Token ip; 298 Token mask = null; 297 Token ip = null; 299 298 Token port = null; 300 299 Integer nESP = null; … … 303 302 <CONNECTION> system = <ID> <SEPERATOR> domain = <ID> 304 303 <LBRACE> 305 ip = <IP> (<SLASH> (mask = <IP>) )? (port = <NUMBER>)?304 (ip = <IP> (port = <NUMBER>)?)? 306 305 <RBRACE> 307 306 { … … 319 318 } 320 319 321 String s Mask= null;322 if ( mask!= null)323 s Mask = mask.image;324 325 NetworkInfo info = new NetworkInfo (null, ip.image, sMask, ports);320 String sIP = null; 321 if (ip != null) 322 sIP = ip.image; 323 324 NetworkInfo info = new NetworkInfo (null, sIP, null, ports); 326 325 source = new Endpoint (netSys, domain, info); 327 326 } … … 329 328 // reinit - used later 330 329 port = null; 331 mask= null;330 ip = null; 332 331 } 333 332 system = <ID> <SEPERATOR> domain = <ID> 334 333 <LBRACE> 335 ip = <IP> (<SLASH> (mask = <IP>) )? (port = <NUMBER>)?334 (ip = <IP> (port = <NUMBER>)?)? 336 335 <RBRACE> 337 336 { … … 349 348 } 350 349 351 String s Mask= null;352 if ( mask!= null)353 s Mask = mask.image;350 String sIP = null; 351 if (ip != null) 352 sIP = ip.image; 354 353 355 NetworkInfo info = new NetworkInfo (null, ip.image, sMask, ports);354 NetworkInfo info = new NetworkInfo (null, sIP, null, ports); 356 355 target = new Endpoint (netSys, domain, info); 357 356 } trunk/framework-plugin/src/com/tresys/framework/compiler/linkage/net/NetConnection.java
r2149 r2215 58 58 59 59 /* (non-Javadoc) 60 * @see java.lang.Object#equals(java.lang.Object) 61 */ 62 public boolean equals (Object obj) 63 { 64 if (super.equals (obj)) 65 return true; 66 67 if (!(obj instanceof NetConnection)) 68 return false; 69 70 NetConnection other = (NetConnection) obj; 71 if (!getSource ().equals (other.getSource ())) 72 return false; 73 74 if (!getTarget ().equals (other.getTarget ())) 75 return false; 76 77 if (!getResource ().equals (other.getResource ())) 78 return false; 79 80 return true; 81 } 82 83 /** 84 * Return a hashcode for the component. Currently implemented as a 85 * call to the String hashCode() method. 86 * 87 * @return integer hashCode of this instance assuring two objects that 88 * are == will return same hashcode. 89 */ 90 public int hashCode() 91 { 92 return this.toString().hashCode(); 93 } 94 95 /* (non-Javadoc) 60 96 * @see java.lang.Object#toString() 61 97 */ trunk/framework-plugin/src/com/tresys/framework/compiler/linkage/net/NetItem.java
- Property svn:keywords changed from Date Revision to Date Rev
r2113 r2215 5 5 |*| Author: Dave Sugar <dsugar@tresys.com> 6 6 |*| 7 |*| $Date $8 |*| $Rev $7 |*| $Date:2008-05-12 13:08:06 -0400 (Mon, 12 May 2008) $ 8 |*| $Rev:2113 $ 9 9 \*/ 10 10 … … 51 51 return false; 52 52 53 if (!m_token.equals (other.m_token))54 return false;53 // if (!m_token.equals (other.m_token)) 54 // return false; 55 55 56 56 return true; trunk/framework-plugin/src/com/tresys/framework/compiler/linkage/net/NetworkConfig.java
- Property svn:keywords changed from Date Revision to Date Rev
r2199 r2215 67 67 { 68 68 m_netresources.put (sName, i_item); 69 m_endpoints.put (sName, new HashSet ()); 70 m_connections.put (sName, new HashSet ()); 69 if (!m_endpoints.containsKey (sName)) 70 m_endpoints.put (sName, new HashSet ()); 71 if (!m_connections.containsKey (sName)) 72 m_connections.put (sName, new HashSet ()); 71 73 } 72 74 } … … 241 243 // m_accesses.add (i_access); 242 244 243 System.out.println ("Add network access " + i_access);245 /// System.out.println ("Add network access " + i_access); 244 246 245 247 NetworkResource netResource = (NetworkResource) i_access.getResource (); … … 276 278 { 277 279 Collection oldConnections = getConnections (netRes); 278 Collection newConnection = new Vector();280 Collection newConnection = new HashSet (); 279 281 280 282 for (Iterator itr = endpoints.iterator (); itr.hasNext (); ) trunk/framework-plugin/src/com/tresys/framework/compiler/policy/SystemResourceValidator.java
r2144 r2215 193 193 m_errHandler.Error ("The Rdef \"" + dobject.GetName() 194 194 + "\" associated with component \"" + i_component.getName() 195 + "\" requires a network resource.", i_component.GetDictionaryObjectLocation(dobject),195 + "\" requires a network information.", i_component.GetDictionaryObjectLocation(dobject), 196 196 ErrorHandler.ERROR_MISSING_NETWORK, i_component.getName ()); 197 197 } trunk/framework-plugin/src/com/tresys/framework/compiler/systemResources/NetworkInfo.java
r2180 r2215 93 93 94 94 NetworkInfo other = (NetworkInfo) obj; 95 if (m_sDevice != other.m_sDevice 96 && m_sDevice != null 97 && !m_sDevice.equals (other.m_sDevice)) 95 if ((m_sDevice != other.m_sDevice && m_sDevice == null) 96 || (m_sDevice != null && !m_sDevice.equals (other.m_sDevice))) 98 97 { 99 98 return false; 100 99 } 101 100 102 if (m_sIPAddr != other.m_sIPAddr 103 && m_sIPAddr != null 104 && !m_sIPAddr.equals (other.m_sIPAddr)) 101 if ((m_sIPAddr != other.m_sIPAddr && m_sIPAddr == null) 102 || (m_sIPAddr != null && !m_sIPAddr.equals (other.m_sIPAddr))) 103 { 104 return false; 105 } 106 107 if ((m_sMask != other.m_sMask && m_sMask == null) 108 || (m_sMask != null && !m_sMask.equals (other.m_sMask))) 105 109 { 106 110 return false; trunk/framework-plugin/src/com/tresys/framework/compiler/systemResources/SystemResourcesParser.jj
r2208 r2215 389 389 return; 390 390 391 if (ipAddr == null) 392 return; 393 391 394 localInfo = new NetworkInfo (null, ipAddr, null, aports); 392 395 NetworkResource network = new LabeledNetworkResource (localInfo, dobj); trunk/framework-plugin/src/com/tresys/framework/plugin/builder/ENetworkConfig.java
r2199 r2215 15 15 import java.beans.PropertyChangeListener; 16 16 import java.util.Collection; 17 import java.util.HashSet; 17 18 import java.util.Iterator; 18 19 … … 20 21 import com.tresys.framework.compiler.dictionary.SysResourceState; 21 22 import com.tresys.framework.compiler.linkage.net.Endpoint; 23 import com.tresys.framework.compiler.linkage.net.NetConnection; 22 24 import com.tresys.framework.compiler.linkage.net.NetResource; 23 25 import com.tresys.framework.compiler.linkage.net.NetSystem; … … 27 29 import com.tresys.framework.compiler.policy.AccessNetwork; 28 30 import com.tresys.framework.compiler.policy.NetworkResource; 31 import com.tresys.framework.compiler.systemResources.NetworkInfo; 29 32 import com.tresys.framework.compiler.systemResources.SystemResourceTypes; 30 33 import com.tresys.framework.plugin.editor.policy.graphic.model.AccessConnection; … … 153 156 154 157 } 158 else if (NetworkResourceShape.NETWORK_INFO_LOCAL.equals (sProperty)) 159 { 160 NetworkInfo oldInfo = (NetworkInfo) e.getOldValue (); 161 NetworkInfo newInfo = (NetworkInfo) e.getNewValue (); 162 163 NetworkResourceShape source = (NetworkResourceShape) e.getSource (); 164 165 Collection endPoints = (Collection) m_endpoints.get (source.getName ()); 166 { 167 HashSet newPoints = new HashSet (); 168 for (Iterator itr1 = endPoints.iterator (); itr1.hasNext (); ) 169 { 170 Endpoint pt = (Endpoint) itr1.next (); 171 if (!pt.getSystem ().getName ().equals (source.getSystem ().getName ())) 172 continue; 173 174 if (pt.getNetworkInfo ().equals (oldInfo)) 175 { 176 NetworkInfo netInfo = new NetworkInfo (newInfo); 177 Endpoint newPoint = new Endpoint (pt.getSystem (), pt.getToken (), netInfo); 178 newPoints.add (newPoint); 179 itr1.remove (); 180 } 181 } 182 endPoints.addAll (newPoints); 183 } 184 185 186 Collection cons = (Collection) m_connections.get (source.getName ()); 187 { 188 HashSet newConnections = new HashSet (); 189 for (Iterator itr1 = cons.iterator (); itr1.hasNext (); ) 190 { 191 NetConnection con = (NetConnection) itr1.next (); 192 if (!con.getResource ().equals (source.getNetResource ())) 193 continue; 194 195 NetConnection newConnection = null; 196 if (con.getSource ().getNetworkInfo ().equals (oldInfo)) 197 { 198 Endpoint oldSource = con.getSource (); 199 Endpoint srcPoint = new Endpoint (oldSource.getSystem (), oldSource.getToken (), newInfo); 200 newConnection = new NetConnection (srcPoint, con.getTarget (), source.getNetResource (), con.getESPNumber ()); 201 } 202 else if (con.getTarget ().getNetworkInfo ().equals (oldInfo)) 203 { 204 Endpoint oldTarget = con.getTarget (); 205 Endpoint targetPoint = new Endpoint (oldTarget.getSystem (), oldTarget.getToken (), newInfo); 206 newConnection = new NetConnection (con.getSource(), targetPoint, source.getNetResource (), con.getESPNumber ()); 207 } 208 if (newConnection != null) 209 { 210 itr1.remove (); 211 newConnections.add (newConnection); 212 } 213 } 214 cons.addAll (newConnections); 215 } 216 } 217 else if (NetworkResourceShape.NETWORK_INFO_REMOTE.equals (sProperty)) 218 { 219 // we really don't care - only local info is used in the fnet file 220 } 155 221 } 156 222 } trunk/framework-plugin/src/com/tresys/framework/plugin/builder/SELinuxSystem.java
r2192 r2215 96 96 /** The saved reference to the Policy */ 97 97 private Policy m_policy; 98 private long m_policyModStamp = IResource.NULL_STAMP; 98 99 99 100 private static boolean libSELinuxLoaded = false; … … 187 188 public Policy getPolicy() 188 189 { 189 if (m_policy == null) 190 { 191 try 192 { 193 IProject proj = getProject(); 194 FrameworkNature nat = FrameworkNature.getNature(proj); 195 196 if (nat.getDictionary () == null) 190 191 try 192 { 193 IProject proj = getProject(); 194 FrameworkNature nat = FrameworkNature.getNature(proj); 195 196 IFile fpol = getFPolFile(); 197 long modStamp = fpol.getModificationStamp (); 198 199 if (modStamp != m_policyModStamp) 200 m_policy = null; 201 202 Dictionary dictionary = nat.getDictionary (); 203 Linkage linkage = getLinkage (); 204 205 if (dictionary == null) 206 { 207 Utility.ProjectError ("No Policies can be built until a valid dictionary is made"); 208 return null; 209 } 210 211 if (m_policy != null) 212 { 213 boolean bReloadPolicy = false; 214 if (m_policy.getDictionary () != dictionary) 215 bReloadPolicy = true; 216 217 if (m_policy.getLinkage () != linkage) 218 bReloadPolicy = true; 219 220 if (bReloadPolicy) 221 m_policy = null; 222 } 223 224 if (m_policy != null) 225 return m_policy; 226 227 228 229 if (DEBUG) 230 System.out.println("SELinuxSystem.java.getPolicy returns null /builder/.."); 231 232 233 // if (m_policy == null) 234 m_policy = new Policy (getName (), dictionary, linkage); 235 236 237 m_policy.setValidInterfaces (getValidInterfaces ()); 238 m_policy.setBasePolicyBooleans (getAllBooleans ()); 239 FrameworkNature.deleteMarkers (fpol); 240 241 ErrorHandler policyHandler = getFPOLErrorHandler(); 242 m_policy.AddPolicyReader (new InputStreamReader (fpol.getContents (true)), getNetworkConfig (), policyHandler); 243 m_policyModStamp = modStamp; 244 245 rebuildSystemResources (); 246 247 Display disp = Display.getDefault(); 248 final SELinuxSystem system = this; 249 disp.syncExec (new Runnable () 250 { 251 public void run() 197 252 { 198 Utility.ProjectError ("No Policies can be built until a valid dictionary is made"); 199 return null; 253 try 254 { 255 parseCustomization (false); 256 257 NetworkAdder adder = new NetworkAdder (getPolicy (), getFPOLErrorHandler ()); 258 getNetworkConfig ().Accept (adder); 259 260 GraphicPolicyRefresh refresh = new GraphicPolicyRefresh (system); 261 getPolicy().Accept(refresh); 262 } 263 catch(Exception e) 264 { 265 e.printStackTrace(); 266 } 200 267 } 201 202 if (DEBUG) 203 System.out.println("SELinuxSystem.java.getPolicy returns null /builder/.."); 204 m_policy = new Policy (getName (), nat.getDictionary (), getLinkage ()); 205 m_policy.setValidInterfaces (getValidInterfaces ()); 206 m_policy.setBasePolicyBooleans (getAllBooleans ()); 207 FrameworkNature.deleteMarkers (getFPolFile()); 208 209 ErrorHandler policyHandler = getFPOLErrorHandler(); 210 m_policy.AddPolicyReader (new InputStreamReader (getFPolFile().getContents (true)), getNetworkConfig (), policyHandler); 211 212 213 rebuildSystemResources (); 214 215 Display disp = Display.getDefault(); 216 final SELinuxSystem system = this; 217 disp.syncExec (new Runnable () 218 { 219 public void run() 220 { 221 try 222 { 223 parseCustomization (false); 224 225 NetworkAdder adder = new NetworkAdder (getPolicy (), getFPOLErrorHandler ()); 226 getNetworkConfig ().Accept (adder); 227 228 GraphicPolicyRefresh refresh = new GraphicPolicyRefresh (system); 229 getPolicy().Accept(refresh); 230 } 231 catch(Exception e) 232 { 233 e.printStackTrace(); 234 } 235 } 236 }); 237 } 238 catch (CoreException ce) 239 { 240 Utility.ProjectError ("Error adding " + getFPolFile().getName () + " to the policy"); 241 ce.printStackTrace (); 242 } 268 }); 269 } 270 catch (CoreException ce) 271 { 272 Utility.ProjectError ("Error adding " + getFPolFile().getName () + " to the policy"); 273 ce.printStackTrace (); 243 274 } 244 275 trunk/framework-plugin/src/com/tresys/framework/plugin/editor/policy/graphic/model/NetworkResourceShape.java
r2213 r2215 3 3 |*| License: refer to COPYING file for license information. 4 4 |*| Author: Norman Patrick <npatrick@tresys.com> 5 |*| Dave Sugar <dsugar@tresys.com> 5 6 |*| 6 7 |*| $Rev$ … … 98 99 public static final String NetworkResource_ip_ports_pattern = "([0-9]+( [0-9]+)*)?"; 99 100 101 public static final String NETWORK_INFO_LOCAL = "NetworkResourceInfo.local"; 102 public static final String NETWORK_INFO_REMOTE = "NetworkResourceInfo.remote"; 103 100 104 private IPropertyDescriptor[] m_descriptors = null; 101 105 private Vector m_rdefs = null; … … 386 390 } 387 391 388 392 private NetworkInfo getNetworkInfo (String i_sInfoType) 393 { 394 Rdef rdef = GetRdef (); 395 NetworkResource resource = (NetworkResource) getComponent (); 396 SystemResource sysResource = null; 397 if (rdef != null) 398 sysResource = resource.GetSystemResource (rdef); 399 // resource.GetSystemResources (m_rdef).get (0); 400 401 NetworkInfo localInfo = null; 402 NetworkInfo remoteInfo = null; 403 404 405 if (sysResource == null) 406 { 407 if (rdef.GetSysResourceState (SystemResourceTypes.ipsec) != SysResourceState.No) 408 { 409 localInfo = new NetworkInfo (null, null, null, null); 410 sysResource = new LabeledNetworkResource (localInfo, rdef); 411 } 412 else if (rdef.GetSysResourceState (SystemResourceTypes.secmark) != SysResourceState.No) 413 { 414 localInfo = new NetworkInfo (null, null, null, null); 415 remoteInfo = new NetworkInfo (null, null, null, null); 416 sysResource = new IPTablesNetworkResource (localInfo, remoteInfo, EMPTY_STRING, rdef); 417 } 418 419 resource.AddSystemResource (rdef, sysResource); 420 } 421 422 if (sysResource instanceof LabeledNetworkResource) 423 { 424 localInfo = ((LabeledNetworkResource) sysResource).getNetworkInfo (); 425 } 426 427 else if (sysResource instanceof IPTablesNetworkResource) 428 { 429 localInfo = ((IPTablesNetworkResource) sysResource).getLocalInfo (); 430 remoteInfo = ((IPTablesNetworkResource) sysResource).getRemoteInfo (); 431 } 432 433 if (NETWORK_INFO_LOCAL.equals (i_sInfoType)) 434 return localInfo; 435 if (NETWORK_INFO_REMOTE.equals (i_sInfoType)) 436 return remoteInfo; 437 return null; 438 } 439 440 public void setLocalDevice (String i_sDevice) 441 { 442 NetworkInfo localInfo = getNetworkInfo (NETWORK_INFO_LOCAL); 443 if (localInfo == null) 444 return; 445 446 NetworkInfo oldInfo = new NetworkInfo (localInfo); 447 localInfo.setDevice (i_sDevice); 448 449 firePropertyChange (NETWORK_INFO_LOCAL, oldInfo, localInfo); 450 } 451 452 public void setLocalIP (String i_sIPAddr) 453 { 454 NetworkInfo localInfo = getNetworkInfo (NETWORK_INFO_LOCAL); 455 if (localInfo == null) 456 return; 457 458 NetworkInfo oldInfo = new NetworkInfo (localInfo); 459 localInfo.setIPAddr (i_sIPAddr); 460 461 firePropertyChange (NETWORK_INFO_LOCAL, oldInfo, localInfo); 462 } 463 464 public void setLocalMask (String i_sMask) 465 { 466 NetworkInfo localInfo = getNetworkInfo (NETWORK_INFO_LOCAL); 467 if (localInfo == null) 468 return; 469 470 NetworkInfo oldInfo = new NetworkInfo (localInfo); 471 localInfo.setMask (i_sMask); 472 473 firePropertyChange (NETWORK_INFO_LOCAL, oldInfo, localInfo); 474 } 475 476 public void setLocalPorts (int [] i_aPorts) 477 { 478 NetworkInfo localInfo = getNetworkInfo (NETWORK_INFO_LOCAL); 479 if (localInfo == null) 480 return; 481 482 NetworkInfo oldInfo = new NetworkInfo (localInfo); 483 localInfo.setPorts (i_aPorts); 484 485 firePropertyChange (NETWORK_INFO_LOCAL, oldInfo, localInfo); 486 } 487 488 public void setRemoteDevice (String i_sDevice) 489 { 490 NetworkInfo remoteInfo = getNetworkInfo (NETWORK_INFO_REMOTE); 491 if (remoteInfo == null) 492 return; 493 494 NetworkInfo oldInfo = new NetworkInfo (remoteInfo); 495 remoteInfo.setDevice (i_sDevice); 496 497 firePropertyChange (NETWORK_INFO_REMOTE, oldInfo, remoteInfo); 498 } 499 500 public void setRemoteIP (String i_sIPAddr) 501 { 502 NetworkInfo remoteInfo = getNetworkInfo (NETWORK_INFO_REMOTE); 503 if (remoteInfo == null) 504 return; 505 506 NetworkInfo oldInfo = new NetworkInfo (remoteInfo); 507 remoteInfo.setIPAddr (i_sIPAddr); 508 509 firePropertyChange (NETWORK_INFO_REMOTE, oldInfo, remoteInfo); 510 } 511 512 public void setRemoteMask (String i_sMask) 513 { 514 NetworkInfo remoteInfo = getNetworkInfo (NETWORK_INFO_REMOTE); 515 if (remoteInfo == null) 516 return; 517 518 NetworkInfo oldInfo = new NetworkInfo (remoteInfo); 519 remoteInfo.setMask (i_sMask); 520 521 firePropertyChange (NETWORK_INFO_REMOTE, oldInfo, remoteInfo); 522 } 523 524 public void setRemotePorts (int [] i_aPorts) 525 { 526 NetworkInfo remoteInfo = getNetworkInfo (NETWORK_INFO_REMOTE); 527 if (remoteInfo == null) 528 return; 529 530 NetworkInfo oldInfo = new NetworkInfo (remoteInfo); 531 remoteInfo.setPorts (i_aPorts); 532 533 firePropertyChange (NETWORK_INFO_REMOTE, oldInfo, remoteInfo); 534 } 535 389 536 public void setNetworkRdef (Rdef i_rdef) 390 537 { … … 598 745 */ 599 746 600 Rdef rdef = GetRdef();747 NetworkResource resource = (NetworkResource) getComponent (); 601 748 602 749 if (NETWORK_TYPE_PROP.equals (propertyId)) … … 614 761 else if (NETWORK_PROTOCOL_INDEX.equals (propertyId)) 615 762 this.SetNetworkProtocolIndex (value); 616 else if ( rdef != null)617 {618 NetworkResource resource = (NetworkResource) getComponent ();619 SystemResource sysResource = null;620 if (rdef != null)621 sysResource = resource.GetSystemResource (rdef);622 // resource.GetSystemResources (m_rdef).get (0); 623 624 NetworkInfo localInfo = null;625 NetworkInfo remoteInfo = null;626 627 628 if ( sysResource == null)763 else if (NETWORK_LOCAL_DEVICE.equals (propertyId)) 764 setLocalDevice ((String) value); 765 else if (NETWORK_LOCAL_IP_ADDRESS.equals (propertyId)) 766 setLocalIP ((String) value); 767 else if (NETWORK_LOCAL_MASK.equals (propertyId)) 768 setLocalMask ((String) value); 769 else if (NETWORK_LOCAL_IP_PORTS.equals (propertyId)) 770 setLocalPorts (ParsePortsString((String) value)); 771 else if (NETWORK_LOCAL_ENCRYPTION_TYPE_INDEX.equals (propertyId)) 772 { 773 NetworkConfig nconfig = getSystem().getNetworkConfig (); 774 775 if (nconfig != null) 629 776 { 630 if (rdef.GetSysResourceState (SystemResourceTypes.ipsec) != SysResourceState.No) 631
