Fix undefined variable and code check.
This commit is contained in:
+3
-3
@@ -855,10 +855,10 @@ class MininetCluster( Mininet ):
|
|||||||
remoteIP = serverIPs[ 0 ]
|
remoteIP = serverIPs[ 0 ]
|
||||||
# Route should contain 'dev <intfname>'
|
# Route should contain 'dev <intfname>'
|
||||||
route = controller.cmd( 'ip route get', remoteIP,
|
route = controller.cmd( 'ip route get', remoteIP,
|
||||||
'| egrep -o "dev\s[^[:space:]]+"' )
|
r'| egrep -o "dev\s[^[:space:]]+"' )
|
||||||
if not route:
|
if not route:
|
||||||
raise Exception('addController: no route from', c0, 'to',
|
raise Exception('addController: no route from', controller,
|
||||||
remoteIP )
|
'to', remoteIP )
|
||||||
intf = route.split()[ 1 ].strip()
|
intf = route.split()[ 1 ].strip()
|
||||||
debug( 'adding', intf, 'to', controller )
|
debug( 'adding', intf, 'to', controller )
|
||||||
Intf( intf, node=controller ).updateIP()
|
Intf( intf, node=controller ).updateIP()
|
||||||
|
|||||||
Reference in New Issue
Block a user