diff options
author | Thomas GraF <tgraf@suug.ch> | 2010-11-03 20:41:24 (GMT) |
---|---|---|
committer | Thomas GraF <tgraf@suug.ch> | 2010-11-03 20:41:24 (GMT) |
commit | 738ee7fea1be1eb404dbaeed291320e605524f1e (patch) | |
tree | 5566446eff1338c5394adb99940f34b4a50d0ec3 | |
parent | d95a4193f3ecd13bc53c8126109d7bd662b5d13d (diff) | |
download | libnl-738ee7fea1be1eb404dbaeed291320e605524f1e.zip libnl-738ee7fea1be1eb404dbaeed291320e605524f1e.tar.gz libnl-738ee7fea1be1eb404dbaeed291320e605524f1e.tar.bz2 |
nl-qdisc-delete: Do not attempt to delete default qdiscs
-rw-r--r-- | src/nl-qdisc-delete.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nl-qdisc-delete.c b/src/nl-qdisc-delete.c index 943d5ae..b230063 100644 --- a/src/nl-qdisc-delete.c +++ b/src/nl-qdisc-delete.c @@ -47,6 +47,10 @@ static void delete_cb(struct nl_object *obj, void *arg) }; int err; + /* Ignore default qdiscs, unable to delete */ + if (rtnl_tc_get_handle((struct rtnl_tc *) qdisc) == 0) + return; + if (interactive && !nl_cli_confirm(obj, ¶ms, default_yes)) return; |