Message ID | 1485093333-18317-1-git-send-email-mrv@mojatatu.com |
---|---|
State | Accepted, archived |
Delegated to: | stephen hemminger |
Headers | show |
On Sun, Jan 22, 2017 at 08:55:33AM -0500, Roman Mashak wrote: > Signed-off-by: Roman Mashak <mrv@mojatatu.com> > Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Acked-by: Phil Sutter <phil@nwl.cc>
On Sun, 22 Jan 2017 08:55:33 -0500 Roman Mashak <mrv@mojatatu.com> wrote: > Signed-off-by: Roman Mashak <mrv@mojatatu.com> > Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> > --- > tc/m_action.c | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) Applied, thanks
diff --git a/tc/m_action.c b/tc/m_action.c index bb19df8..05ef07e 100644 --- a/tc/m_action.c +++ b/tc/m_action.c @@ -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;