Adding listen socket to UserSwitch when there is no listenPort set

This commit is contained in:
Brian O'Connor
2014-07-09 17:47:25 -07:00
parent 3b484491ce
commit 191df1cb73
+3 -1
View File
@@ -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 ) +