• Eric Dumazet's avatar
    net_sched: do not broadcast RTM_GETTFILTER result · fa59b27c
    Eric Dumazet authored
    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: default avatarEric Dumazet <edumazet@google.com>
    Cc: Jamal Hadi Salim <jhs@mojatatu.com>
    Acked-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    fa59b27c
cls_api.c 15.6 KB