fixing --nat option in mn

This commit is contained in:
Brian O'Connor
2013-10-03 16:29:05 -07:00
parent a802d8b19a
commit ffeb16eb66
4 changed files with 16 additions and 17 deletions
+4 -2
View File
@@ -226,8 +226,6 @@ class MininetRunner( object ):
start = time.time()
topo = buildTopo( TOPOS, self.options.topo )
if self.options.nat:
topo.addNAT()
switch = customConstructor( SWITCHES, self.options.switch )
host = customConstructor( HOSTS, self.options.host )
controller = customConstructor( CONTROLLERS, self.options.controller )
@@ -255,6 +253,10 @@ class MininetRunner( object ):
autoStaticArp=arp, autoPinCpus=pin,
listenPort=listenPort )
if self.options.nat:
nat = mn.addNAT()
mn.configHosts()
if self.options.pre:
CLI( mn, script=self.options.pre )