From c7e86f9374bb774db5a2f6e1c01a37c5e53c99a3 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Thu, 5 Dec 2013 17:30:09 -0800 Subject: [PATCH] fixing CLI host rewriting when host's default interface does not have an IP --- mininet/cli.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mininet/cli.py b/mininet/cli.py index 3ca190f..2ff9825 100644 --- a/mininet/cli.py +++ b/mininet/cli.py @@ -331,7 +331,8 @@ class CLI( Cmd ): node = self.mn[ first ] rest = args.split( ' ' ) # Substitute IP addresses for node names in command - rest = [ self.mn[ arg ].defaultIntf().updateIP() + # If updateIP() returns None, then use node name + rest = [ self.mn[ arg ].defaultIntf().updateIP() or arg if arg in self.mn else arg for arg in rest ] rest = ' '.join( rest )