From 0298e9be7d7561f11f12578e1ae7d745d1f40d65 Mon Sep 17 00:00:00 2001 From: Rahman Pujianto Date: Mon, 9 Nov 2015 11:48:12 +0700 Subject: [PATCH] addNAT always use first switch addNAT always use first switch even though another switch specified --- mininet/net.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mininet/net.py b/mininet/net.py index 7cda0ae..917c2b7 100755 --- a/mininet/net.py +++ b/mininet/net.py @@ -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: