From e1ca7196c7260d272b450ffab1fb5b539ab1ffb6 Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Wed, 23 May 2012 13:37:02 -0700 Subject: [PATCH] configHosts(): don't try to configure nonexistent interfaces. --- mininet/net.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mininet/net.py b/mininet/net.py index 827d72f..8b9e7c8 100755 --- a/mininet/net.py +++ b/mininet/net.py @@ -244,7 +244,12 @@ class Mininet( object ): "Configure a set of hosts." for host in self.hosts: 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! # BL: do we want to do this here or not? # May not make sense if we have CPU lmiting...