Skip to content
Snippets Groups Projects
Commit ece509d5 authored by Bob Lantz's avatar Bob Lantz
Browse files

add connected() to LinuxBridge

parent 29350004
No related branches found
No related tags found
No related merge requests found
...@@ -26,6 +26,13 @@ def __init__( self, name, stp=False, prio=None, **kwargs ): ...@@ -26,6 +26,13 @@ def __init__( self, name, stp=False, prio=None, **kwargs ):
LinuxBridge.nextPrio += 1 LinuxBridge.nextPrio += 1
Switch.__init__( self, name, **kwargs ) Switch.__init__( self, name, **kwargs )
def connected( self ):
"Are we forwarding yet?"
if self.stp:
return 'forwarding' in self.cmd( 'brctl showstp', self )
else:
return True
def start( self, controllers ): def start( self, controllers ):
self.cmd( 'ifconfig', self, 'down' ) self.cmd( 'ifconfig', self, 'down' )
self.cmd( 'brctl delbr', self ) self.cmd( 'brctl delbr', self )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment