diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-11-19 09:19:38 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-11-19 16:39:06 -0500 |
commit | 68eb55031da7c967d954e5f9415cd05f4abdb692 (patch) | |
tree | 75751944b0c808ba191bcc6a752389593c41e805 /net/netlink | |
parent | 62b68e99faa802352e9cb2ae91adecd8dfddf1b8 (diff) |
genetlink: pass family to functions using groups
This doesn't really change anything, but prepares for the
next patch that will change the APIs to pass the group ID
within the family, rather than the global group ID.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlink')
-rw-r--r-- | net/netlink/genetlink.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c index e9ef640200b4..36e3a86cacf6 100644 --- a/net/netlink/genetlink.c +++ b/net/netlink/genetlink.c | |||
@@ -883,11 +883,12 @@ static int genl_ctrl_event(int event, struct genl_family *family, | |||
883 | return PTR_ERR(msg); | 883 | return PTR_ERR(msg); |
884 | 884 | ||
885 | if (!family->netnsok) { | 885 | if (!family->netnsok) { |
886 | genlmsg_multicast_netns(&init_net, msg, 0, | 886 | genlmsg_multicast_netns(&genl_ctrl, &init_net, msg, 0, |
887 | GENL_ID_CTRL, GFP_KERNEL); | 887 | GENL_ID_CTRL, GFP_KERNEL); |
888 | } else { | 888 | } else { |
889 | rcu_read_lock(); | 889 | rcu_read_lock(); |
890 | genlmsg_multicast_allns(msg, 0, GENL_ID_CTRL, GFP_ATOMIC); | 890 | genlmsg_multicast_allns(&genl_ctrl, msg, 0, |
891 | GENL_ID_CTRL, GFP_ATOMIC); | ||
891 | rcu_read_unlock(); | 892 | rcu_read_unlock(); |
892 | } | 893 | } |
893 | 894 | ||
@@ -993,14 +994,15 @@ static int genlmsg_mcast(struct sk_buff *skb, u32 portid, unsigned long group, | |||
993 | return err; | 994 | return err; |
994 | } | 995 | } |
995 | 996 | ||
996 | int genlmsg_multicast_allns(struct sk_buff *skb, u32 portid, unsigned int group, | 997 | int genlmsg_multicast_allns(struct genl_family *family, struct sk_buff *skb, |
997 | gfp_t flags) | 998 | u32 portid, unsigned int group, gfp_t flags) |
998 | { | 999 | { |
999 | return genlmsg_mcast(skb, portid, group, flags); | 1000 | return genlmsg_mcast(skb, portid, group, flags); |
1000 | } | 1001 | } |
1001 | EXPORT_SYMBOL(genlmsg_multicast_allns); | 1002 | EXPORT_SYMBOL(genlmsg_multicast_allns); |
1002 | 1003 | ||
1003 | void genl_notify(struct sk_buff *skb, struct net *net, u32 portid, u32 group, | 1004 | void genl_notify(struct genl_family *family, |
1005 | struct sk_buff *skb, struct net *net, u32 portid, u32 group, | ||
1004 | struct nlmsghdr *nlh, gfp_t flags) | 1006 | struct nlmsghdr *nlh, gfp_t flags) |
1005 | { | 1007 | { |
1006 | struct sock *sk = net->genl_sock; | 1008 | struct sock *sk = net->genl_sock; |