]> git.baikalelectronics.ru Git - kernel.git/commit
net_sched: do not broadcast RTM_GETTFILTER result
authorEric Dumazet <edumazet@google.com>
Mon, 10 Oct 2016 03:25:55 +0000 (20:25 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Oct 2016 13:51:55 +0000 (09:51 -0400)
commitfa59b27c9d6f84e91e333175a242afa4aee79283
tree8f54c3d5629d9d0c630849678ec51aa1f101856d
parent6d3a4c404648e415e7d96e285d723936d4df7ed0
net_sched: do not broadcast RTM_GETTFILTER result

There are two ways to get tc filters from kernel to user space.

1) Full dump (tc_dump_tfilter())
2) RTM_GETTFILTER to get one precise filter, reducing overhead.

The second operation is unfortunately broadcasting its result,
polluting "tc monitor" users.

This patch makes sure only the requester gets the result, using
netlink_unicast() instead of rtnetlink_send()

Jamal cooked an iproute2 patch to implement "tc filter get" operation,
but other user space libraries already use RTM_GETTFILTER when a single
filter is queried, instead of dumping all filters.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/cls_api.c