Adding listen socket to UserSwitch when there is no listenPort set
This commit is contained in:
+3
-1
@@ -856,6 +856,8 @@ class UserSwitch( Switch ):
|
|||||||
'(openflow.org)' )
|
'(openflow.org)' )
|
||||||
if self.listenPort:
|
if self.listenPort:
|
||||||
self.opts += ' --listen=ptcp:%i ' % self.listenPort
|
self.opts += ' --listen=ptcp:%i ' % self.listenPort
|
||||||
|
else:
|
||||||
|
self.opts += ' --listen=punix:/tmp/%s.listen' % self.name
|
||||||
self.dpopts = dpopts
|
self.dpopts = dpopts
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -868,7 +870,7 @@ class UserSwitch( Switch ):
|
|||||||
"Run dpctl command"
|
"Run dpctl command"
|
||||||
listenAddr = None
|
listenAddr = None
|
||||||
if not self.listenPort:
|
if not self.listenPort:
|
||||||
listenAddr = 'unix:/tmp/' + self.name
|
listenAddr = 'unix:/tmp/%s.listen' % self.name
|
||||||
else:
|
else:
|
||||||
listenAddr = 'tcp:127.0.0.1:%i' % self.listenPort
|
listenAddr = 'tcp:127.0.0.1:%i' % self.listenPort
|
||||||
return self.cmd( 'dpctl ' + ' '.join( args ) +
|
return self.cmd( 'dpctl ' + ' '.join( args ) +
|
||||||
|
|||||||
Reference in New Issue
Block a user