addNAT always use first switch

addNAT always use first switch even though another switch specified
This commit is contained in:
Rahman Pujianto
2015-11-09 11:48:12 +07:00
parent 7c6d645a0a
commit 0298e9be7d
+1 -1
View File
@@ -281,7 +281,7 @@ class Mininet( object ):
# Use first switch if not specified
connect = self.switches[ 0 ]
# Connect the nat to the switch
self.addLink( nat, self.switches[ 0 ] )
self.addLink( nat, connect )
# Set the default route on hosts
natIP = nat.params[ 'ip' ].split('/')[ 0 ]
for host in self.hosts: