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:
Olivier Tilmans
2016-03-11 13:36:56 +01:00
parent e171aba8b5
commit 5cfc9f84b8
+1 -1
View File
@@ -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 = []