Add option to turn off passive listening port

This commit is contained in:
Brandon Heller
2010-08-18 02:08:34 -07:00
parent b480b6ef77
commit 0a9358c9fc
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -174,7 +174,7 @@ class Mininet( object ):
sw = self.switch( name, listenPort=self.listenPort,
defaultMAC=mac, defaultIP=ip, dp=self.dps,
inNamespace=self.inNamespace )
if not self.inNamespace:
if not self.inNamespace and self.listenPort:
self.listenPort += 1
self.dps += 1
self.switches.append( sw )