mirror of
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git
synced 2024-12-11 18:54:33 +08:00
tc: distinguish Add/Replace action operations.
Signed-off-by: Roman Mashak <mrv@mojatatu.com> Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Acked-by: Phil Sutter <phil@nwl.cc>
This commit is contained in:
parent
6bbe5e6290
commit
31951c47e9
@ -365,12 +365,18 @@ int print_action(const struct sockaddr_nl *who,
|
||||
fprintf(fp, "Flushed table ");
|
||||
tab_flush = 1;
|
||||
} else {
|
||||
fprintf(fp, "deleted action ");
|
||||
fprintf(fp, "Deleted action ");
|
||||
}
|
||||
}
|
||||
|
||||
if (n->nlmsg_type == RTM_NEWACTION)
|
||||
fprintf(fp, "Added action ");
|
||||
if (n->nlmsg_type == RTM_NEWACTION) {
|
||||
if ((n->nlmsg_flags & NLM_F_CREATE) &&
|
||||
!(n->nlmsg_flags & NLM_F_REPLACE)) {
|
||||
fprintf(fp, "Added action ");
|
||||
} else if (n->nlmsg_flags & NLM_F_REPLACE) {
|
||||
fprintf(fp, "Replaced action ");
|
||||
}
|
||||
}
|
||||
tc_print_action(fp, tb[TCA_ACT_TAB]);
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user