]> 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)
commitf8ab01e131344fe16e943ad3fa162ed491d6904a
tree8f54c3d5629d9d0c630849678ec51aa1f101856d
parentcbd7a65097dd8f2690c6180934156164a6d831d0
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