TCIntf: Don't delete a non-existing root qdisc
In recent kernels, virtual interfaces come without any associated qdisc, resulting in errors when spawning the network. Checking for "noqueue" in the tc output, enables to detect that case and thus avoid deleting the non-existent qdisc.
This commit is contained in:
1 parent
e171aba8b5
commit
5cfc9f84b8
1 file changed
+1
-1
+1
-1
@@ -329,7 +329,7 @@ class TCIntf( Intf ):
|
||||
|
||||
# Clear existing configuration
|
||||
tcoutput = self.tc( '%s qdisc show dev %s' )
|
||||
if "priomap" not in tcoutput:
|
||||
if "priomap" not in tcoutput and "noqueue" not in tcoutput:
|
||||
cmds = [ '%s qdisc del dev %s root' ]
|
||||
else:
|
||||
cmds = []
|
||||
|
||||
Reference in new issue
Block a user