mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-04 04:02:26 +00:00
audit: send multicast messages only if there are listeners
Test first to see if there are any userspace multicast listeners bound to the socket before starting the multicast send work. Signed-off-by: Richard Guy Briggs <rgb@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
451f921639
commit
7f74ecd788
@ -435,6 +435,9 @@ static void kauditd_send_multicast_skb(struct sk_buff *skb)
|
||||
struct audit_net *aunet = net_generic(&init_net, audit_net_id);
|
||||
struct sock *sock = aunet->nlsk;
|
||||
|
||||
if (!netlink_has_listeners(sock, AUDIT_NLGRP_READLOG))
|
||||
return;
|
||||
|
||||
/*
|
||||
* The seemingly wasteful skb_copy() rather than bumping the refcount
|
||||
* using skb_get() is necessary because non-standard mods are made to
|
||||
|
Loading…
Reference in New Issue
Block a user