From 5cfc9f84b81bc9e11e9ebb3f8821f8a52b218733 Mon Sep 17 00:00:00 2001 From: Olivier Tilmans Date: Fri, 11 Mar 2016 13:36:56 +0100 Subject: [PATCH] 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. --- mininet/link.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mininet/link.py b/mininet/link.py index 9703ce7..badc688 100644 --- a/mininet/link.py +++ b/mininet/link.py @@ -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 = []