diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/net/genetlink.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/net/genetlink.h b/include/net/genetlink.h index 93695f0e22a..af10c2cf8a1 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink.h @@ -394,4 +394,12 @@ static inline int genl_set_err(struct genl_family *family, struct net *net, return netlink_set_err(net->genl_sock, portid, group, code); } +static inline int genl_has_listeners(struct genl_family *family, + struct sock *sk, unsigned int group) +{ + if (WARN_ON_ONCE(group >= family->n_mcgrps)) + return -EINVAL; + group = family->mcgrp_offset + group; + return netlink_has_listeners(sk, group); +} #endif /* __NET_GENERIC_NETLINK_H */ |