[NETLINK]: Add netlink_has_listeners for avoiding unneccessary event message generation
authorPatrick McHardy <kaber@trash.net>
Tue, 21 Mar 2006 02:52:01 +0000 (18:52 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Mar 2006 02:52:01 +0000 (18:52 -0800)
commit4277a083ecd2c8771058641132bcecea04ca6608
treec35d659c63fa4d64e2569e5eebd76e1b3fba9a15
parenta24276924875802853b5bdc12c56d29f1c1bbc79
[NETLINK]: Add netlink_has_listeners for avoiding unneccessary event message generation

Keep a bitmask of multicast groups with subscribed listeners to let
netlink users check for listeners before generating multicast
messages.

Queries don't perform any locking, which may result in false
positives, it is guaranteed however that any new subscriptions are
visible before bind() or setsockopt() return.

Signed-off-by: Patrick McHardy <kaber@trash.net>
ACKed-by: Jamal Hadi Salim<hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netlink.h
net/netlink/af_netlink.c