use net.addLink() so that link is cleaned up

This commit is contained in:
Bob Lantz
2015-02-03 16:02:07 -08:00
parent 9483f6378f
commit 19331ca287
+1 -1
View File
@@ -39,7 +39,7 @@ def connectToRootNS( network, switch, ip, routes ):
routes: host networks to route to"""
# Create a node in root namespace and link to switch 0
root = Node( 'root', inNamespace=False )
intf = Link( root, switch ).intf1
intf = network.addLink( root, switch ).intf1
root.setIP( ip, intf=intf )
# Start network that now includes link to root namespace
network.start()