From 191df1cb731743dc938b5fac7268e358b0de69b0 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Wed, 9 Jul 2014 17:47:25 -0700 Subject: [PATCH] Adding listen socket to UserSwitch when there is no listenPort set --- mininet/node.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mininet/node.py b/mininet/node.py index 96107f9..568d986 100644 --- a/mininet/node.py +++ b/mininet/node.py @@ -856,6 +856,8 @@ class UserSwitch( Switch ): '(openflow.org)' ) if self.listenPort: self.opts += ' --listen=ptcp:%i ' % self.listenPort + else: + self.opts += ' --listen=punix:/tmp/%s.listen' % self.name self.dpopts = dpopts @classmethod @@ -868,7 +870,7 @@ class UserSwitch( Switch ): "Run dpctl command" listenAddr = None if not self.listenPort: - listenAddr = 'unix:/tmp/' + self.name + listenAddr = 'unix:/tmp/%s.listen' % self.name else: listenAddr = 'tcp:127.0.0.1:%i' % self.listenPort return self.cmd( 'dpctl ' + ' '.join( args ) +