Skip to content
Snippets Groups Projects
Commit a8a9e7d2 authored by Olivier Tilmans's avatar Olivier Tilmans Committed by Bob Lantz
Browse files

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.
parent c5517f78
No related branches found
No related tags found
No related merge requests found
......@@ -330,7 +330,7 @@ def config( self, bw=None, delay=None, jitter=None, loss=None,
# 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 = []
......
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