don't crash when link is TCLink but without options
caused by optimized return in link.py#275 in TCIntf.config()
This commit is contained in:
+4
-1
@@ -847,10 +847,13 @@ class UserSwitch( Switch ):
|
||||
minspeed = ifspeed * 0.001
|
||||
|
||||
res = intf.config( **intf.params )
|
||||
parent = res['parent']
|
||||
|
||||
if res is None: # link may not have TC parameters
|
||||
return
|
||||
|
||||
# Re-add qdisc, root, and default classes user switch created, but
|
||||
# with new parent, as setup by Mininet's TCIntf
|
||||
parent = res['parent']
|
||||
intf.tc( "%s qdisc add dev %s " + parent +
|
||||
" handle 1: htb default 0xfffe" )
|
||||
intf.tc( "%s class add dev %s classid 1:0xffff parent 1: htb rate "
|
||||
|
||||
Reference in New Issue
Block a user