From e900a16caf0c1c9342890cdefa75d8bc9e56822d Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Thu, 19 Aug 2010 14:42:33 -0700 Subject: [PATCH] Don't try to modprobe tun if it's built-in (e.g. Ubuntu.) --- mininet/node.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mininet/node.py b/mininet/node.py index 3c2521c..1f4f51d 100644 --- a/mininet/node.py +++ b/mininet/node.py @@ -471,7 +471,8 @@ class UserSwitch( Switch ): @staticmethod def setup(): "Ensure any dependencies are loaded; if not, try to load them." - moduleDeps( add=TUN ) + if not os.path.exists( '/dev/net/tun' ): + moduleDeps( add=TUN ) def start( self, controllers ): """Start OpenFlow reference user datapath.