aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/cls_api.c
diff options
context:
space:
mode:
authorRoman Mashak <mrv@mojatatu.com>2016-11-16 17:16:10 -0500
committerDavid S. Miller <davem@davemloft.net>2016-11-17 13:42:12 -0500
commit30a391a13ab9215d7569da4e1773c5bb4deed96d (patch)
tree20250119f6658ad14b0cc09d8512de29a621d319 /net/sched/cls_api.c
parentb5c2d49544e5930c96e2632a7eece3f4325a1888 (diff)
net sched filters: pass netlink message flags in event notification
Userland client should be able to read an event, and reflect it back to the kernel, therefore it needs to extract complete set of netlink flags. For example, this will allow "tc monitor" to distinguish Add and Replace operations. Signed-off-by: Roman Mashak <mrv@mojatatu.com> Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/cls_api.c')
-rw-r--r--net/sched/cls_api.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 2b2a7974e4bb..8e93d4afe5ea 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -112,7 +112,7 @@ static void tfilter_notify_chain(struct net *net, struct sk_buff *oskb,
112 112
113 for (it_chain = chain; (tp = rtnl_dereference(*it_chain)) != NULL; 113 for (it_chain = chain; (tp = rtnl_dereference(*it_chain)) != NULL;
114 it_chain = &tp->next) 114 it_chain = &tp->next)
115 tfilter_notify(net, oskb, n, tp, 0, event, false); 115 tfilter_notify(net, oskb, n, tp, n->nlmsg_flags, event, false);
116} 116}
117 117
118/* Select new prio value from the range, managed by kernel. */ 118/* Select new prio value from the range, managed by kernel. */
@@ -430,7 +430,8 @@ static int tfilter_notify(struct net *net, struct sk_buff *oskb,
430 if (!skb) 430 if (!skb)
431 return -ENOBUFS; 431 return -ENOBUFS;
432 432
433 if (tcf_fill_node(net, skb, tp, fh, portid, n->nlmsg_seq, 0, event) <= 0) { 433 if (tcf_fill_node(net, skb, tp, fh, portid, n->nlmsg_seq,
434 n->nlmsg_flags, event) <= 0) {
434 kfree_skb(skb); 435 kfree_skb(skb);
435 return -EINVAL; 436 return -EINVAL;
436 } 437 }