]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
tc: distinguish Add/Replace qdisc operations
authorRoman Mashak <mrv@mojatatu.com>
Thu, 26 Oct 2017 21:30:08 +0000 (17:30 -0400)
committerStephen Hemminger <stephen@networkplumber.org>
Sun, 12 Nov 2017 23:57:08 +0000 (15:57 -0800)
Signed-off-by: Roman Mashak <mrv@mojatatu.com>
tc/tc_qdisc.c

index 1e9d909789e60637173c8a9cc5e1975eccb156a9..493538c2ffa6fa763d4915b196d599e2d5ab3a9b 100644 (file)
@@ -231,6 +231,16 @@ int print_qdisc(const struct sockaddr_nl *who,
        if (n->nlmsg_type == RTM_DELQDISC)
                fprintf(fp, "deleted ");
 
+       if (n->nlmsg_type == RTM_NEWQDISC &&
+                       (n->nlmsg_flags & NLM_F_CREATE) &&
+                       (n->nlmsg_flags & NLM_F_REPLACE))
+               fprintf(fp, "replaced ");
+
+       if (n->nlmsg_type == RTM_NEWQDISC &&
+                       (n->nlmsg_flags & NLM_F_CREATE) &&
+                       (n->nlmsg_flags & NLM_F_EXCL))
+               fprintf(fp, "added ");
+
        if (show_raw)
                fprintf(fp, "qdisc %s %x:[%08x]  ",
                        rta_getattr_str(tb[TCA_KIND]),