configHosts(): don't try to configure nonexistent interfaces.
This commit is contained in:
+6
-1
@@ -244,7 +244,12 @@ class Mininet( object ):
|
|||||||
"Configure a set of hosts."
|
"Configure a set of hosts."
|
||||||
for host in self.hosts:
|
for host in self.hosts:
|
||||||
info( host.name + ' ' )
|
info( host.name + ' ' )
|
||||||
host.configDefault( defaultRoute=host.defaultIntf() )
|
intf = host.defaultIntf()
|
||||||
|
if intf:
|
||||||
|
host.configDefault( defaultRoute=intf )
|
||||||
|
else:
|
||||||
|
# Don't configure nonexistent intf
|
||||||
|
host.configDefault( ip=None, mac=None )
|
||||||
# You're low priority, dude!
|
# You're low priority, dude!
|
||||||
# BL: do we want to do this here or not?
|
# BL: do we want to do this here or not?
|
||||||
# May not make sense if we have CPU lmiting...
|
# May not make sense if we have CPU lmiting...
|
||||||
|
|||||||
Reference in New Issue
Block a user