From: Roman Mashak Date: Thu, 26 Oct 2017 21:30:08 +0000 (-0400) Subject: tc: distinguish Add/Replace qdisc operations X-Git-Tag: v4.15.0~146^2~2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=274b63ae21a07497bf12827128fa7594b842cf24;p=mirror_iproute2.git tc: distinguish Add/Replace qdisc operations Signed-off-by: Roman Mashak --- diff --git a/tc/tc_qdisc.c b/tc/tc_qdisc.c index 1e9d9097..493538c2 100644 --- a/tc/tc_qdisc.c +++ b/tc/tc_qdisc.c @@ -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]),