aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2005-08-14 22:29:52 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 19:00:54 -0400
commitac6d439d2097b72ea0cbc2322ce1263a38bc1fd0 (patch)
tree19e638a226993dddede5a2da577e2572f7555a95
parentd629b836d151d43332492651dd841d32e57ebe3b (diff)
[NETLINK]: Convert netlink users to use group numbers instead of bitmasks
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/w1/w1_netlink.c2
-rw-r--r--include/linux/netfilter/nfnetlink.h23
-rw-r--r--include/linux/netfilter_decnet.h14
-rw-r--r--include/linux/rtnetlink.h42
-rw-r--r--include/linux/selinux_netlink.h13
-rw-r--r--include/linux/xfrm.h18
-rw-r--r--lib/kobject_uevent.c2
-rw-r--r--net/bridge/netfilter/ebt_ulog.c4
-rw-r--r--net/core/neighbour.c8
-rw-r--r--net/core/rtnetlink.c6
-rw-r--r--net/core/wireless.c4
-rw-r--r--net/decnet/dn_dev.c8
-rw-r--r--net/decnet/dn_table.c4
-rw-r--r--net/decnet/netfilter/dn_rtmsg.c6
-rw-r--r--net/ipv4/devinet.c7
-rw-r--r--net/ipv4/fib_frontend.c2
-rw-r--r--net/ipv4/fib_semantics.c4
-rw-r--r--net/ipv4/netfilter/ip_conntrack_netlink.c12
-rw-r--r--net/ipv4/netfilter/ipt_ULOG.c8
-rw-r--r--net/ipv6/addrconf.c24
-rw-r--r--net/ipv6/route.c8
-rw-r--r--net/netfilter/nfnetlink.c2
-rw-r--r--net/sched/act_api.c8
-rw-r--r--net/sched/cls_api.c2
-rw-r--r--net/sched/sch_api.c4
-rw-r--r--net/xfrm/xfrm_user.c35
-rw-r--r--security/selinux/netlink.c4
27 files changed, 183 insertions, 91 deletions
diff --git a/drivers/w1/w1_netlink.c b/drivers/w1/w1_netlink.c
index 2a82fb055c70..e7b774423dd6 100644
--- a/drivers/w1/w1_netlink.c
+++ b/drivers/w1/w1_netlink.c
@@ -51,7 +51,7 @@ void w1_netlink_send(struct w1_master *dev, struct w1_netlink_msg *msg)
51 51
52 memcpy(data, msg, sizeof(struct w1_netlink_msg)); 52 memcpy(data, msg, sizeof(struct w1_netlink_msg));
53 53
54 NETLINK_CB(skb).dst_groups = dev->groups; 54 NETLINK_CB(skb).dst_group = dev->groups;
55 netlink_broadcast(dev->nls, skb, 0, dev->groups, GFP_ATOMIC); 55 netlink_broadcast(dev->nls, skb, 0, dev->groups, GFP_ATOMIC);
56 56
57nlmsg_failure: 57nlmsg_failure:
diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h
index b0feb2374079..1d5b10ae2399 100644
--- a/include/linux/netfilter/nfnetlink.h
+++ b/include/linux/netfilter/nfnetlink.h
@@ -2,13 +2,34 @@
2#define _NFNETLINK_H 2#define _NFNETLINK_H
3#include <linux/types.h> 3#include <linux/types.h>
4 4
5/* nfnetlink groups: Up to 32 maximum */ 5#ifndef __KERNEL__
6/* nfnetlink groups: Up to 32 maximum - backwards compatibility for userspace */
6#define NF_NETLINK_CONNTRACK_NEW 0x00000001 7#define NF_NETLINK_CONNTRACK_NEW 0x00000001
7#define NF_NETLINK_CONNTRACK_UPDATE 0x00000002 8#define NF_NETLINK_CONNTRACK_UPDATE 0x00000002
8#define NF_NETLINK_CONNTRACK_DESTROY 0x00000004 9#define NF_NETLINK_CONNTRACK_DESTROY 0x00000004
9#define NF_NETLINK_CONNTRACK_EXP_NEW 0x00000008 10#define NF_NETLINK_CONNTRACK_EXP_NEW 0x00000008
10#define NF_NETLINK_CONNTRACK_EXP_UPDATE 0x00000010 11#define NF_NETLINK_CONNTRACK_EXP_UPDATE 0x00000010
11#define NF_NETLINK_CONNTRACK_EXP_DESTROY 0x00000020 12#define NF_NETLINK_CONNTRACK_EXP_DESTROY 0x00000020
13#endif
14
15enum nfnetlink_groups {
16 NFNLGRP_NONE,
17#define NFNLGRP_NONE NFNLGRP_NONE
18 NFNLGRP_CONNTRACK_NEW,
19#define NFNLGRP_CONNTRACK_NEW NFNLGRP_CONNTRACK_NEW
20 NFNLGRP_CONNTRACK_UPDATE,
21#define NFNLGRP_CONNTRACK_UPDATE NFNLGRP_CONNTRACK_UPDATE
22 NFNLGRP_CONNTRACK_DESTROY,
23#define NFNLGRP_CONNTRACK_DESTROY NFNLGRP_CONNTRACK_DESTROY
24 NFNLGRP_CONNTRACK_EXP_NEW,
25#define NFNLGRP_CONNTRACK_EXP_NEW NFNLGRP_CONNTRACK_EXP_NEW
26 NFNLGRP_CONNTRACK_EXP_UPDATE,
27#define NFNLGRP_CONNTRACK_EXP_UPDATE NFNLGRP_CONNTRACK_EXP_UPDATE
28 NFNLGRP_CONNTRACK_EXP_DESTROY,
29#define NFNLGRP_CONNTRACK_EXP_DESTROY NFNLGRP_CONNTRACK_EXP_DESTROY
30 __NFNLGRP_MAX,
31};
32#define NFNLGRP_MAX (__NFNLGRP_MAX - 1)
12 33
13/* Generic structure for encapsulation optional netfilter information. 34/* Generic structure for encapsulation optional netfilter information.
14 * It is reminiscent of sockaddr, but with sa_family replaced 35 * It is reminiscent of sockaddr, but with sa_family replaced
diff --git a/include/linux/netfilter_decnet.h b/include/linux/netfilter_decnet.h
index 018979484150..6f425369ee29 100644
--- a/include/linux/netfilter_decnet.h
+++ b/include/linux/netfilter_decnet.h
@@ -56,7 +56,21 @@ struct nf_dn_rtmsg {
56 56
57#define NFDN_RTMSG(r) ((unsigned char *)(r) + NLMSG_ALIGN(sizeof(struct nf_dn_rtmsg))) 57#define NFDN_RTMSG(r) ((unsigned char *)(r) + NLMSG_ALIGN(sizeof(struct nf_dn_rtmsg)))
58 58
59#ifndef __KERNEL__
60/* backwards compatibility for userspace */
59#define DNRMG_L1_GROUP 0x01 61#define DNRMG_L1_GROUP 0x01
60#define DNRMG_L2_GROUP 0x02 62#define DNRMG_L2_GROUP 0x02
63#endif
64
65enum {
66 DNRNG_NLGRP_NONE,
67#define DNRNG_NLGRP_NONE DNRNG_NLGRP_NONE
68 DNRNG_NLGRP_L1,
69#define DNRNG_NLGRP_L1 DNRNG_NLGRP_L1
70 DNRNG_NLGRP_L2,
71#define DNRNG_NLGRP_L2 DNRNG_NLGRP_L2
72 __DNRNG_NLGRP_MAX
73};
74#define DNRNG_NLGRP_MAX (__DNRNG_NLGRP_MAX - 1)
61 75
62#endif /*__LINUX_DECNET_NETFILTER_H*/ 76#endif /*__LINUX_DECNET_NETFILTER_H*/
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index 657c05ab8f9e..c231e9a08f0b 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -826,9 +826,8 @@ enum
826#define TCA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcmsg)))) 826#define TCA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct tcmsg))))
827#define TCA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcmsg)) 827#define TCA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcmsg))
828 828
829 829#ifndef __KERNEL__
830/* RTnetlink multicast groups */ 830/* RTnetlink multicast groups - backwards compatibility for userspace */
831
832#define RTMGRP_LINK 1 831#define RTMGRP_LINK 1
833#define RTMGRP_NOTIFY 2 832#define RTMGRP_NOTIFY 2
834#define RTMGRP_NEIGH 4 833#define RTMGRP_NEIGH 4
@@ -847,6 +846,43 @@ enum
847#define RTMGRP_DECnet_ROUTE 0x4000 846#define RTMGRP_DECnet_ROUTE 0x4000
848 847
849#define RTMGRP_IPV6_PREFIX 0x20000 848#define RTMGRP_IPV6_PREFIX 0x20000
849#endif
850
851/* RTnetlink multicast groups */
852enum rtnetlink_groups {
853 RTNLGRP_NONE,
854#define RTNLGRP_NONE RTNLGRP_NONE
855 RTNLGRP_LINK,
856#define RTNLGRP_LINK RTNLGRP_LINK
857 RTNLGRP_NOTIFY,
858#define RTNLGRP_NOTIFY RTNLGRP_NOTIFY
859 RTNLGRP_NEIGH,
860#define RTNLGRP_NEIGH RTNLGRP_NEIGH
861 RTNLGRP_TC,
862#define RTNLGRP_TC RTNLGRP_TC
863 RTNLGRP_IPV4_IFADDR,
864#define RTNLGRP_IPV4_IFADDR RTNLGRP_IPV4_IFADDR
865 RTNLGRP_IPV4_MROUTE,
866#define RTNLGRP_IPV4_MROUTE RTNLGRP_IPV4_MROUTE
867 RTNLGRP_IPV4_ROUTE,
868#define RTNLGRP_IPV4_ROUTE RTNLGRP_IPV4_ROUTE
869 RTNLGRP_IPV6_IFADDR,
870#define RTNLGRP_IPV6_IFADDR RTNLGRP_IPV6_IFADDR
871 RTNLGRP_IPV6_MROUTE,
872#define RTNLGRP_IPV6_MROUTE RTNLGRP_IPV6_MROUTE
873 RTNLGRP_IPV6_ROUTE,
874#define RTNLGRP_IPV6_ROUTE RTNLGRP_IPV6_ROUTE
875 RTNLGRP_IPV6_IFINFO,
876#define RTNLGRP_IPV6_IFINFO RTNLGRP_IPV6_IFINFO
877 RTNLGRP_DECnet_IFADDR,
878#define RTNLGRP_DECnet_IFADDR RTNLGRP_DECnet_IFADDR
879 RTNLGRP_DECnet_ROUTE,
880#define RTNLGRP_DECnet_ROUTE RTNLGRP_DECnet_ROUTE
881 RTNLGRP_IPV6_PREFIX,
882#define RTNLGRP_IPV6_PREFIX RTNLGRP_IPV6_PREFIX
883 __RTNLGRP_MAX
884};
885#define RTNLGRP_MAX (__RTNLGRP_MAX - 1)
850 886
851/* TC action piece */ 887/* TC action piece */
852struct tcamsg 888struct tcamsg
diff --git a/include/linux/selinux_netlink.h b/include/linux/selinux_netlink.h
index 957e6ebca4e6..bbf489decd84 100644
--- a/include/linux/selinux_netlink.h
+++ b/include/linux/selinux_netlink.h
@@ -20,10 +20,21 @@ enum {
20 SELNL_MSG_MAX 20 SELNL_MSG_MAX
21}; 21};
22 22
23/* Multicast groups */ 23#ifndef __KERNEL__
24/* Multicast groups - backwards compatiblility for userspace */
24#define SELNL_GRP_NONE 0x00000000 25#define SELNL_GRP_NONE 0x00000000
25#define SELNL_GRP_AVC 0x00000001 /* AVC notifications */ 26#define SELNL_GRP_AVC 0x00000001 /* AVC notifications */
26#define SELNL_GRP_ALL 0xffffffff 27#define SELNL_GRP_ALL 0xffffffff
28#endif
29
30enum selinux_nlgroups {
31 SELNLGRP_NONE,
32#define SELNLGRP_NONE SELNLGRP_NONE
33 SELNLGRP_AVC,
34#define SELNLGRP_AVC SELNLGRP_AVC
35 __SELNLGRP_MAX
36};
37#define SELNLGRP_MAX (__SELNLGRP_MAX - 1)
27 38
28/* Message structures */ 39/* Message structures */
29struct selnl_msg_setenforce { 40struct selnl_msg_setenforce {
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h
index f0d423300d84..0fb077d68441 100644
--- a/include/linux/xfrm.h
+++ b/include/linux/xfrm.h
@@ -258,9 +258,27 @@ struct xfrm_usersa_flush {
258 __u8 proto; 258 __u8 proto;
259}; 259};
260 260
261#ifndef __KERNEL__
262/* backwards compatibility for userspace */
261#define XFRMGRP_ACQUIRE 1 263#define XFRMGRP_ACQUIRE 1
262#define XFRMGRP_EXPIRE 2 264#define XFRMGRP_EXPIRE 2
263#define XFRMGRP_SA 4 265#define XFRMGRP_SA 4
264#define XFRMGRP_POLICY 8 266#define XFRMGRP_POLICY 8
267#endif
268
269enum xfrm_nlgroups {
270 XFRMNLGRP_NONE,
271#define XFRMNLGRP_NONE XFRMNLGRP_NONE
272 XFRMNLGRP_ACQUIRE,
273#define XFRMNLGRP_ACQUIRE XFRMNLGRP_ACQUIRE
274 XFRMNLGRP_EXPIRE,
275#define XFRMNLGRP_EXPIRE XFRMNLGRP_EXPIRE
276 XFRMNLGRP_SA,
277#define XFRMNLGRP_SA XFRMNLGRP_SA
278 XFRMNLGRP_POLICY,
279#define XFRMNLGRP_POLICY XFRMNLGRP_POLICY
280 __XFRMNLGRP_MAX
281};
282#define XFRMNLGRP_MAX (__XFRMNLGRP_MAX - 1)
265 283
266#endif /* _LINUX_XFRM_H */ 284#endif /* _LINUX_XFRM_H */
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
index bc000619f4f8..1ebd735d6439 100644
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -93,7 +93,7 @@ static int send_uevent(const char *signal, const char *obj,
93 } 93 }
94 } 94 }
95 95
96 NETLINK_CB(skb).dst_groups = 1; 96 NETLINK_CB(skb).dst_group = 1;
97 return netlink_broadcast(uevent_sock, skb, 0, 1, gfp_mask); 97 return netlink_broadcast(uevent_sock, skb, 0, 1, gfp_mask);
98} 98}
99 99
diff --git a/net/bridge/netfilter/ebt_ulog.c b/net/bridge/netfilter/ebt_ulog.c
index acb888d32587..6845b5dd6d77 100644
--- a/net/bridge/netfilter/ebt_ulog.c
+++ b/net/bridge/netfilter/ebt_ulog.c
@@ -78,8 +78,8 @@ static void ulog_send(unsigned int nlgroup)
78 if (ub->qlen > 1) 78 if (ub->qlen > 1)
79 ub->lastnlh->nlmsg_type = NLMSG_DONE; 79 ub->lastnlh->nlmsg_type = NLMSG_DONE;
80 80
81 NETLINK_CB(ub->skb).dst_groups = 1 << nlgroup; 81 NETLINK_CB(ub->skb).dst_group = nlgroup + 1;
82 netlink_broadcast(ebtulognl, ub->skb, 0, 1 << nlgroup, GFP_ATOMIC); 82 netlink_broadcast(ebtulognl, ub->skb, 0, nlgroup + 1, GFP_ATOMIC);
83 83
84 ub->qlen = 0; 84 ub->qlen = 0;
85 ub->skb = NULL; 85 ub->skb = NULL;
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 72ee00f7b30c..39fc55edf691 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -2343,8 +2343,8 @@ void neigh_app_ns(struct neighbour *n)
2343 } 2343 }
2344 nlh = (struct nlmsghdr *)skb->data; 2344 nlh = (struct nlmsghdr *)skb->data;
2345 nlh->nlmsg_flags = NLM_F_REQUEST; 2345 nlh->nlmsg_flags = NLM_F_REQUEST;
2346 NETLINK_CB(skb).dst_groups = RTMGRP_NEIGH; 2346 NETLINK_CB(skb).dst_group = RTNLGRP_NEIGH;
2347 netlink_broadcast(rtnl, skb, 0, RTMGRP_NEIGH, GFP_ATOMIC); 2347 netlink_broadcast(rtnl, skb, 0, RTNLGRP_NEIGH, GFP_ATOMIC);
2348} 2348}
2349 2349
2350static void neigh_app_notify(struct neighbour *n) 2350static void neigh_app_notify(struct neighbour *n)
@@ -2361,8 +2361,8 @@ static void neigh_app_notify(struct neighbour *n)
2361 return; 2361 return;
2362 } 2362 }
2363 nlh = (struct nlmsghdr *)skb->data; 2363 nlh = (struct nlmsghdr *)skb->data;
2364 NETLINK_CB(skb).dst_groups = RTMGRP_NEIGH; 2364 NETLINK_CB(skb).dst_group = RTNLGRP_NEIGH;
2365 netlink_broadcast(rtnl, skb, 0, RTMGRP_NEIGH, GFP_ATOMIC); 2365 netlink_broadcast(rtnl, skb, 0, RTNLGRP_NEIGH, GFP_ATOMIC);
2366} 2366}
2367 2367
2368#endif /* CONFIG_ARPD */ 2368#endif /* CONFIG_ARPD */
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 9b3c61f1a37d..5f3f95b5585d 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -148,7 +148,7 @@ int rtnetlink_send(struct sk_buff *skb, u32 pid, unsigned group, int echo)
148{ 148{
149 int err = 0; 149 int err = 0;
150 150
151 NETLINK_CB(skb).dst_groups = group; 151 NETLINK_CB(skb).dst_group = group;
152 if (echo) 152 if (echo)
153 atomic_inc(&skb->users); 153 atomic_inc(&skb->users);
154 netlink_broadcast(rtnl, skb, pid, group, GFP_KERNEL); 154 netlink_broadcast(rtnl, skb, pid, group, GFP_KERNEL);
@@ -458,8 +458,8 @@ void rtmsg_ifinfo(int type, struct net_device *dev, unsigned change)
458 kfree_skb(skb); 458 kfree_skb(skb);
459 return; 459 return;
460 } 460 }
461 NETLINK_CB(skb).dst_groups = RTMGRP_LINK; 461 NETLINK_CB(skb).dst_group = RTNLGRP_LINK;
462 netlink_broadcast(rtnl, skb, 0, RTMGRP_LINK, GFP_KERNEL); 462 netlink_broadcast(rtnl, skb, 0, RTNLGRP_LINK, GFP_KERNEL);
463} 463}
464 464
465static int rtnetlink_done(struct netlink_callback *cb) 465static int rtnetlink_done(struct netlink_callback *cb)
diff --git a/net/core/wireless.c b/net/core/wireless.c
index 3ff5639c0b78..19fa6a5389b3 100644
--- a/net/core/wireless.c
+++ b/net/core/wireless.c
@@ -1144,8 +1144,8 @@ static inline void rtmsg_iwinfo(struct net_device * dev,
1144 kfree_skb(skb); 1144 kfree_skb(skb);
1145 return; 1145 return;
1146 } 1146 }
1147 NETLINK_CB(skb).dst_groups = RTMGRP_LINK; 1147 NETLINK_CB(skb).dst_group = RTNLGRP_LINK;
1148 netlink_broadcast(rtnl, skb, 0, RTMGRP_LINK, GFP_ATOMIC); 1148 netlink_broadcast(rtnl, skb, 0, RTNLGRP_LINK, GFP_ATOMIC);
1149} 1149}
1150#endif /* WE_EVENT_NETLINK */ 1150#endif /* WE_EVENT_NETLINK */
1151 1151
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c
index 00233ecbc9cb..5610bb16dbf9 100644
--- a/net/decnet/dn_dev.c
+++ b/net/decnet/dn_dev.c
@@ -752,16 +752,16 @@ static void rtmsg_ifa(int event, struct dn_ifaddr *ifa)
752 752
753 skb = alloc_skb(size, GFP_KERNEL); 753 skb = alloc_skb(size, GFP_KERNEL);
754 if (!skb) { 754 if (!skb) {
755 netlink_set_err(rtnl, 0, RTMGRP_DECnet_IFADDR, ENOBUFS); 755 netlink_set_err(rtnl, 0, RTNLGRP_DECnet_IFADDR, ENOBUFS);
756 return; 756 return;
757 } 757 }
758 if (dn_dev_fill_ifaddr(skb, ifa, 0, 0, event, 0) < 0) { 758 if (dn_dev_fill_ifaddr(skb, ifa, 0, 0, event, 0) < 0) {
759 kfree_skb(skb); 759 kfree_skb(skb);
760 netlink_set_err(rtnl, 0, RTMGRP_DECnet_IFADDR, EINVAL); 760 netlink_set_err(rtnl, 0, RTNLGRP_DECnet_IFADDR, EINVAL);
761 return; 761 return;
762 } 762 }
763 NETLINK_CB(skb).dst_groups = RTMGRP_DECnet_IFADDR; 763 NETLINK_CB(skb).dst_group = RTNLGRP_DECnet_IFADDR;
764 netlink_broadcast(rtnl, skb, 0, RTMGRP_DECnet_IFADDR, GFP_KERNEL); 764 netlink_broadcast(rtnl, skb, 0, RTNLGRP_DECnet_IFADDR, GFP_KERNEL);
765} 765}
766 766
767static int dn_dev_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb) 767static int dn_dev_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb)
diff --git a/net/decnet/dn_table.c b/net/decnet/dn_table.c
index 28ba5777a25a..73a88489ff3e 100644
--- a/net/decnet/dn_table.c
+++ b/net/decnet/dn_table.c
@@ -349,10 +349,10 @@ static void dn_rtmsg_fib(int event, struct dn_fib_node *f, int z, int tb_id,
349 kfree_skb(skb); 349 kfree_skb(skb);
350 return; 350 return;
351 } 351 }
352 NETLINK_CB(skb).dst_groups = RTMGRP_DECnet_ROUTE; 352 NETLINK_CB(skb).dst_group = RTNLGRP_DECnet_ROUTE;
353 if (nlh->nlmsg_flags & NLM_F_ECHO) 353 if (nlh->nlmsg_flags & NLM_F_ECHO)
354 atomic_inc(&skb->users); 354 atomic_inc(&skb->users);
355 netlink_broadcast(rtnl, skb, pid, RTMGRP_DECnet_ROUTE, GFP_KERNEL); 355 netlink_broadcast(rtnl, skb, pid, RTNLGRP_DECnet_ROUTE, GFP_KERNEL);
356 if (nlh->nlmsg_flags & NLM_F_ECHO) 356 if (nlh->nlmsg_flags & NLM_F_ECHO)
357 netlink_unicast(rtnl, skb, pid, MSG_DONTWAIT); 357 netlink_unicast(rtnl, skb, pid, MSG_DONTWAIT);
358} 358}
diff --git a/net/decnet/netfilter/dn_rtmsg.c b/net/decnet/netfilter/dn_rtmsg.c
index 3068fddb2da3..353fed6888f9 100644
--- a/net/decnet/netfilter/dn_rtmsg.c
+++ b/net/decnet/netfilter/dn_rtmsg.c
@@ -71,10 +71,10 @@ static void dnrmg_send_peer(struct sk_buff *skb)
71 71
72 switch(flags & DN_RT_CNTL_MSK) { 72 switch(flags & DN_RT_CNTL_MSK) {
73 case DN_RT_PKT_L1RT: 73 case DN_RT_PKT_L1RT:
74 group = DNRMG_L1_GROUP; 74 group = DNRMG_L1_NLGRP;
75 break; 75 break;
76 case DN_RT_PKT_L2RT: 76 case DN_RT_PKT_L2RT:
77 group = DNRMG_L2_GROUP; 77 group = DNRMG_L2_NLGRP;
78 break; 78 break;
79 default: 79 default:
80 return; 80 return;
@@ -83,7 +83,7 @@ static void dnrmg_send_peer(struct sk_buff *skb)
83 skb2 = dnrmg_build_message(skb, &status); 83 skb2 = dnrmg_build_message(skb, &status);
84 if (skb2 == NULL) 84 if (skb2 == NULL)
85 return; 85 return;
86 NETLINK_CB(skb2).dst_groups = group; 86 NETLINK_CB(skb2).dst_group = group;
87 netlink_broadcast(dnrmg, skb2, 0, group, GFP_ATOMIC); 87 netlink_broadcast(dnrmg, skb2, 0, group, GFP_ATOMIC);
88} 88}
89 89
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index d8a10e3dd77d..ba2895ae8151 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1111,13 +1111,12 @@ static void rtmsg_ifa(int event, struct in_ifaddr* ifa)
1111 struct sk_buff *skb = alloc_skb(size, GFP_KERNEL); 1111 struct sk_buff *skb = alloc_skb(size, GFP_KERNEL);
1112 1112
1113 if (!skb) 1113 if (!skb)
1114 netlink_set_err(rtnl, 0, RTMGRP_IPV4_IFADDR, ENOBUFS); 1114 netlink_set_err(rtnl, 0, RTNLGRP_IPV4_IFADDR, ENOBUFS);
1115 else if (inet_fill_ifaddr(skb, ifa, current->pid, 0, event, 0) < 0) { 1115 else if (inet_fill_ifaddr(skb, ifa, current->pid, 0, event, 0) < 0) {
1116 kfree_skb(skb); 1116 kfree_skb(skb);
1117 netlink_set_err(rtnl, 0, RTMGRP_IPV4_IFADDR, EINVAL); 1117 netlink_set_err(rtnl, 0, RTNLGRP_IPV4_IFADDR, EINVAL);
1118 } else { 1118 } else {
1119 NETLINK_CB(skb).dst_groups = RTMGRP_IPV4_IFADDR; 1119 netlink_broadcast(rtnl, skb, 0, RTNLGRP_IPV4_IFADDR, GFP_KERNEL);
1120 netlink_broadcast(rtnl, skb, 0, RTMGRP_IPV4_IFADDR, GFP_KERNEL);
1121 } 1120 }
1122} 1121}
1123 1122
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index 75d03e37b9a8..d4e7b578a25d 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -560,7 +560,7 @@ static void nl_fib_input(struct sock *sk, int len)
560 pid = nlh->nlmsg_pid; /*pid of sending process */ 560 pid = nlh->nlmsg_pid; /*pid of sending process */
561 NETLINK_CB(skb).pid = 0; /* from kernel */ 561 NETLINK_CB(skb).pid = 0; /* from kernel */
562 NETLINK_CB(skb).dst_pid = pid; 562 NETLINK_CB(skb).dst_pid = pid;
563 NETLINK_CB(skb).dst_groups = 0; /* unicast */ 563 NETLINK_CB(skb).dst_group = 0; /* unicast */
564 netlink_unicast(sk, skb, pid, MSG_DONTWAIT); 564 netlink_unicast(sk, skb, pid, MSG_DONTWAIT);
565} 565}
566 566
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index e278cb9d0075..7e4651b3caa8 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -290,10 +290,10 @@ void rtmsg_fib(int event, u32 key, struct fib_alias *fa,
290 kfree_skb(skb); 290 kfree_skb(skb);
291 return; 291 return;
292 } 292 }
293 NETLINK_CB(skb).dst_groups = RTMGRP_IPV4_ROUTE; 293 NETLINK_CB(skb).dst_group = RTNLGRP_IPV4_ROUTE;
294 if (n->nlmsg_flags&NLM_F_ECHO) 294 if (n->nlmsg_flags&NLM_F_ECHO)
295 atomic_inc(&skb->users); 295 atomic_inc(&skb->users);
296 netlink_broadcast(rtnl, skb, pid, RTMGRP_IPV4_ROUTE, GFP_KERNEL); 296 netlink_broadcast(rtnl, skb, pid, RTNLGRP_IPV4_ROUTE, GFP_KERNEL);
297 if (n->nlmsg_flags&NLM_F_ECHO) 297 if (n->nlmsg_flags&NLM_F_ECHO)
298 netlink_unicast(rtnl, skb, pid, MSG_DONTWAIT); 298 netlink_unicast(rtnl, skb, pid, MSG_DONTWAIT);
299} 299}
diff --git a/net/ipv4/netfilter/ip_conntrack_netlink.c b/net/ipv4/netfilter/ip_conntrack_netlink.c
index 1221a9c8bac2..a4e9278db4ed 100644
--- a/net/ipv4/netfilter/ip_conntrack_netlink.c
+++ b/net/ipv4/netfilter/ip_conntrack_netlink.c
@@ -297,7 +297,7 @@ static int ctnetlink_conntrack_event(struct notifier_block *this,
297 struct sk_buff *skb; 297 struct sk_buff *skb;
298 unsigned int type; 298 unsigned int type;
299 unsigned char *b; 299 unsigned char *b;
300 unsigned int flags = 0, groups; 300 unsigned int flags = 0, group;
301 301
302 /* ignore our fake conntrack entry */ 302 /* ignore our fake conntrack entry */
303 if (ct == &ip_conntrack_untracked) 303 if (ct == &ip_conntrack_untracked)
@@ -305,7 +305,7 @@ static int ctnetlink_conntrack_event(struct notifier_block *this,
305 305
306 if (events & IPCT_DESTROY) { 306 if (events & IPCT_DESTROY) {
307 type = IPCTNL_MSG_CT_DELETE; 307 type = IPCTNL_MSG_CT_DELETE;
308 groups = NF_NETLINK_CONNTRACK_DESTROY; 308 group = NFNLGRP_CONNTRACK_DESTROY;
309 goto alloc_skb; 309 goto alloc_skb;
310 } 310 }
311 if (events & (IPCT_NEW | IPCT_RELATED)) { 311 if (events & (IPCT_NEW | IPCT_RELATED)) {
@@ -313,7 +313,7 @@ static int ctnetlink_conntrack_event(struct notifier_block *this,
313 flags = NLM_F_CREATE|NLM_F_EXCL; 313 flags = NLM_F_CREATE|NLM_F_EXCL;
314 /* dump everything */ 314 /* dump everything */
315 events = ~0UL; 315 events = ~0UL;
316 groups = NF_NETLINK_CONNTRACK_NEW; 316 group = NFNLGRP_CONNTRACK_NEW;
317 goto alloc_skb; 317 goto alloc_skb;
318 } 318 }
319 if (events & (IPCT_STATUS | 319 if (events & (IPCT_STATUS |
@@ -322,7 +322,7 @@ static int ctnetlink_conntrack_event(struct notifier_block *this,
322 IPCT_HELPINFO | 322 IPCT_HELPINFO |
323 IPCT_NATINFO)) { 323 IPCT_NATINFO)) {
324 type = IPCTNL_MSG_CT_NEW; 324 type = IPCTNL_MSG_CT_NEW;
325 groups = NF_NETLINK_CONNTRACK_UPDATE; 325 group = NFNLGRP_CONNTRACK_UPDATE;
326 goto alloc_skb; 326 goto alloc_skb;
327 } 327 }
328 328
@@ -375,7 +375,7 @@ alloc_skb:
375 goto nfattr_failure; 375 goto nfattr_failure;
376 376
377 nlh->nlmsg_len = skb->tail - b; 377 nlh->nlmsg_len = skb->tail - b;
378 nfnetlink_send(skb, 0, groups, 0); 378 nfnetlink_send(skb, 0, group, 0);
379 return NOTIFY_DONE; 379 return NOTIFY_DONE;
380 380
381nlmsg_failure: 381nlmsg_failure:
@@ -1194,7 +1194,7 @@ static int ctnetlink_expect_event(struct notifier_block *this,
1194 1194
1195 nlh->nlmsg_len = skb->tail - b; 1195 nlh->nlmsg_len = skb->tail - b;
1196 proto = exp->tuple.dst.protonum; 1196 proto = exp->tuple.dst.protonum;
1197 nfnetlink_send(skb, 0, NF_NETLINK_CONNTRACK_EXP_NEW, 0); 1197 nfnetlink_send(skb, 0, NFNLGRP_CONNTRACK_EXP_NEW, 0);
1198 return NOTIFY_DONE; 1198 return NOTIFY_DONE;
1199 1199
1200nlmsg_failure: 1200nlmsg_failure:
diff --git a/net/ipv4/netfilter/ipt_ULOG.c b/net/ipv4/netfilter/ipt_ULOG.c
index 1d8ac4595e17..89816b83455e 100644
--- a/net/ipv4/netfilter/ipt_ULOG.c
+++ b/net/ipv4/netfilter/ipt_ULOG.c
@@ -116,10 +116,10 @@ static void ulog_send(unsigned int nlgroupnum)
116 if (ub->qlen > 1) 116 if (ub->qlen > 1)
117 ub->lastnlh->nlmsg_type = NLMSG_DONE; 117 ub->lastnlh->nlmsg_type = NLMSG_DONE;
118 118
119 NETLINK_CB(ub->skb).dst_groups = (1 << nlgroupnum); 119 NETLINK_CB(ub->skb).dst_group = nlgroupnum + 1;
120 DEBUGP("ipt_ULOG: throwing %d packets to netlink mask %u\n", 120 DEBUGP("ipt_ULOG: throwing %d packets to netlink group %u\n",
121 ub->qlen, nlgroupnum); 121 ub->qlen, nlgroupnum + 1);
122 netlink_broadcast(nflognl, ub->skb, 0, (1 << nlgroupnum), GFP_ATOMIC); 122 netlink_broadcast(nflognl, ub->skb, 0, nlgroupnum + 1, GFP_ATOMIC);
123 123
124 ub->qlen = 0; 124 ub->qlen = 0;
125 ub->skb = NULL; 125 ub->skb = NULL;
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index b9c3da349492..493abf94bcfc 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -2858,16 +2858,16 @@ static void inet6_ifa_notify(int event, struct inet6_ifaddr *ifa)
2858 2858
2859 skb = alloc_skb(size, GFP_ATOMIC); 2859 skb = alloc_skb(size, GFP_ATOMIC);
2860 if (!skb) { 2860 if (!skb) {
2861 netlink_set_err(rtnl, 0, RTMGRP_IPV6_IFADDR, ENOBUFS); 2861 netlink_set_err(rtnl, 0, RTNLGRP_IPV6_IFADDR, ENOBUFS);
2862 return; 2862 return;
2863 } 2863 }
2864 if (inet6_fill_ifaddr(skb, ifa, current->pid, 0, event, 0) < 0) { 2864 if (inet6_fill_ifaddr(skb, ifa, current->pid, 0, event, 0) < 0) {
2865 kfree_skb(skb); 2865 kfree_skb(skb);
2866 netlink_set_err(rtnl, 0, RTMGRP_IPV6_IFADDR, EINVAL); 2866 netlink_set_err(rtnl, 0, RTNLGRP_IPV6_IFADDR, EINVAL);
2867 return; 2867 return;
2868 } 2868 }
2869 NETLINK_CB(skb).dst_groups = RTMGRP_IPV6_IFADDR; 2869 NETLINK_CB(skb).dst_group = RTNLGRP_IPV6_IFADDR;
2870 netlink_broadcast(rtnl, skb, 0, RTMGRP_IPV6_IFADDR, GFP_ATOMIC); 2870 netlink_broadcast(rtnl, skb, 0, RTNLGRP_IPV6_IFADDR, GFP_ATOMIC);
2871} 2871}
2872 2872
2873static void inline ipv6_store_devconf(struct ipv6_devconf *cnf, 2873static void inline ipv6_store_devconf(struct ipv6_devconf *cnf,
@@ -2994,16 +2994,16 @@ void inet6_ifinfo_notify(int event, struct inet6_dev *idev)
2994 2994
2995 skb = alloc_skb(size, GFP_ATOMIC); 2995 skb = alloc_skb(size, GFP_ATOMIC);
2996 if (!skb) { 2996 if (!skb) {
2997 netlink_set_err(rtnl, 0, RTMGRP_IPV6_IFINFO, ENOBUFS); 2997 netlink_set_err(rtnl, 0, RTNLGRP_IPV6_IFINFO, ENOBUFS);
2998 return; 2998 return;
2999 } 2999 }
3000 if (inet6_fill_ifinfo(skb, idev, current->pid, 0, event, 0) < 0) { 3000 if (inet6_fill_ifinfo(skb, idev, current->pid, 0, event, 0) < 0) {
3001 kfree_skb(skb); 3001 kfree_skb(skb);
3002 netlink_set_err(rtnl, 0, RTMGRP_IPV6_IFINFO, EINVAL); 3002 netlink_set_err(rtnl, 0, RTNLGRP_IPV6_IFINFO, EINVAL);
3003 return; 3003 return;
3004 } 3004 }
3005 NETLINK_CB(skb).dst_groups = RTMGRP_IPV6_IFINFO; 3005 NETLINK_CB(skb).dst_group = RTNLGRP_IPV6_IFINFO;
3006 netlink_broadcast(rtnl, skb, 0, RTMGRP_IPV6_IFINFO, GFP_ATOMIC); 3006 netlink_broadcast(rtnl, skb, 0, RTNLGRP_IPV6_IFINFO, GFP_ATOMIC);
3007} 3007}
3008 3008
3009static int inet6_fill_prefix(struct sk_buff *skb, struct inet6_dev *idev, 3009static int inet6_fill_prefix(struct sk_buff *skb, struct inet6_dev *idev,
@@ -3054,16 +3054,16 @@ static void inet6_prefix_notify(int event, struct inet6_dev *idev,
3054 3054
3055 skb = alloc_skb(size, GFP_ATOMIC); 3055 skb = alloc_skb(size, GFP_ATOMIC);
3056 if (!skb) { 3056 if (!skb) {
3057 netlink_set_err(rtnl, 0, RTMGRP_IPV6_PREFIX, ENOBUFS); 3057 netlink_set_err(rtnl, 0, RTNLGRP_IPV6_PREFIX, ENOBUFS);
3058 return; 3058 return;
3059 } 3059 }
3060 if (inet6_fill_prefix(skb, idev, pinfo, current->pid, 0, event, 0) < 0) { 3060 if (inet6_fill_prefix(skb, idev, pinfo, current->pid, 0, event, 0) < 0) {
3061 kfree_skb(skb); 3061 kfree_skb(skb);
3062 netlink_set_err(rtnl, 0, RTMGRP_IPV6_PREFIX, EINVAL); 3062 netlink_set_err(rtnl, 0, RTNLGRP_IPV6_PREFIX, EINVAL);
3063 return; 3063 return;
3064 } 3064 }
3065 NETLINK_CB(skb).dst_groups = RTMGRP_IPV6_PREFIX; 3065 NETLINK_CB(skb).dst_group = RTNLGRP_IPV6_PREFIX;
3066 netlink_broadcast(rtnl, skb, 0, RTMGRP_IPV6_PREFIX, GFP_ATOMIC); 3066 netlink_broadcast(rtnl, skb, 0, RTNLGRP_IPV6_PREFIX, GFP_ATOMIC);
3067} 3067}
3068 3068
3069static struct rtnetlink_link inet6_rtnetlink_table[RTM_NR_MSGTYPES] = { 3069static struct rtnetlink_link inet6_rtnetlink_table[RTM_NR_MSGTYPES] = {
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 878789b3122d..6ea494ab4e02 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1850,16 +1850,16 @@ void inet6_rt_notify(int event, struct rt6_info *rt, struct nlmsghdr *nlh,
1850 1850
1851 skb = alloc_skb(size, gfp_any()); 1851 skb = alloc_skb(size, gfp_any());
1852 if (!skb) { 1852 if (!skb) {
1853 netlink_set_err(rtnl, 0, RTMGRP_IPV6_ROUTE, ENOBUFS); 1853 netlink_set_err(rtnl, 0, RTNLGRP_IPV6_ROUTE, ENOBUFS);
1854 return; 1854 return;
1855 } 1855 }
1856 if (rt6_fill_node(skb, rt, NULL, NULL, 0, event, pid, seq, 0, 0) < 0) { 1856 if (rt6_fill_node(skb, rt, NULL, NULL, 0, event, pid, seq, 0, 0) < 0) {
1857 kfree_skb(skb); 1857 kfree_skb(skb);
1858 netlink_set_err(rtnl, 0, RTMGRP_IPV6_ROUTE, EINVAL); 1858 netlink_set_err(rtnl, 0, RTNLGRP_IPV6_ROUTE, EINVAL);
1859 return; 1859 return;
1860 } 1860 }
1861 NETLINK_CB(skb).dst_groups = RTMGRP_IPV6_ROUTE; 1861 NETLINK_CB(skb).dst_group = RTNLGRP_IPV6_ROUTE;
1862 netlink_broadcast(rtnl, skb, 0, RTMGRP_IPV6_ROUTE, gfp_any()); 1862 netlink_broadcast(rtnl, skb, 0, RTNLGRP_IPV6_ROUTE, gfp_any());
1863} 1863}
1864 1864
1865/* 1865/*
diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c
index 84efffdbade3..36a4c5fbb7d7 100644
--- a/net/netfilter/nfnetlink.c
+++ b/net/netfilter/nfnetlink.c
@@ -198,7 +198,7 @@ int nfnetlink_send(struct sk_buff *skb, u32 pid, unsigned group, int echo)
198 int allocation = in_interrupt() ? GFP_ATOMIC : GFP_KERNEL; 198 int allocation = in_interrupt() ? GFP_ATOMIC : GFP_KERNEL;
199 int err = 0; 199 int err = 0;
200 200
201 NETLINK_CB(skb).dst_groups = group; 201 NETLINK_CB(skb).dst_group = group;
202 if (echo) 202 if (echo)
203 atomic_inc(&skb->users); 203 atomic_inc(&skb->users);
204 netlink_broadcast(nfnl, skb, pid, group, allocation); 204 netlink_broadcast(nfnl, skb, pid, group, allocation);
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index c896a0118a32..8aebe8f6d271 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -593,7 +593,7 @@ static int tca_action_flush(struct rtattr *rta, struct nlmsghdr *n, u32 pid)
593 nlh->nlmsg_flags |= NLM_F_ROOT; 593 nlh->nlmsg_flags |= NLM_F_ROOT;
594 module_put(a->ops->owner); 594 module_put(a->ops->owner);
595 kfree(a); 595 kfree(a);
596 err = rtnetlink_send(skb, pid, RTMGRP_TC, n->nlmsg_flags&NLM_F_ECHO); 596 err = rtnetlink_send(skb, pid, RTNLGRP_TC, n->nlmsg_flags&NLM_F_ECHO);
597 if (err > 0) 597 if (err > 0)
598 return 0; 598 return 0;
599 599
@@ -656,7 +656,7 @@ tca_action_gd(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int event)
656 656
657 /* now do the delete */ 657 /* now do the delete */
658 tcf_action_destroy(head, 0); 658 tcf_action_destroy(head, 0);
659 ret = rtnetlink_send(skb, pid, RTMGRP_TC, 659 ret = rtnetlink_send(skb, pid, RTNLGRP_TC,
660 n->nlmsg_flags&NLM_F_ECHO); 660 n->nlmsg_flags&NLM_F_ECHO);
661 if (ret > 0) 661 if (ret > 0)
662 return 0; 662 return 0;
@@ -698,9 +698,9 @@ static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event,
698 x->rta_len = skb->tail - (u8*)x; 698 x->rta_len = skb->tail - (u8*)x;
699 699
700 nlh->nlmsg_len = skb->tail - b; 700 nlh->nlmsg_len = skb->tail - b;
701 NETLINK_CB(skb).dst_groups = RTMGRP_TC; 701 NETLINK_CB(skb).dst_group = RTNLGRP_TC;
702 702
703 err = rtnetlink_send(skb, pid, RTMGRP_TC, flags&NLM_F_ECHO); 703 err = rtnetlink_send(skb, pid, RTNLGRP_TC, flags&NLM_F_ECHO);
704 if (err > 0) 704 if (err > 0)
705 err = 0; 705 err = 0;
706 return err; 706 return err;
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 3b5714ef4d1a..b4d89fbb3782 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -367,7 +367,7 @@ static int tfilter_notify(struct sk_buff *oskb, struct nlmsghdr *n,
367 return -EINVAL; 367 return -EINVAL;
368 } 368 }
369 369
370 return rtnetlink_send(skb, pid, RTMGRP_TC, n->nlmsg_flags&NLM_F_ECHO); 370 return rtnetlink_send(skb, pid, RTNLGRP_TC, n->nlmsg_flags&NLM_F_ECHO);
371} 371}
372 372
373struct tcf_dump_args 373struct tcf_dump_args
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index b9a069af4a02..737681cb9a92 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -816,7 +816,7 @@ static int qdisc_notify(struct sk_buff *oskb, struct nlmsghdr *n,
816 } 816 }
817 817
818 if (skb->len) 818 if (skb->len)
819 return rtnetlink_send(skb, pid, RTMGRP_TC, n->nlmsg_flags&NLM_F_ECHO); 819 return rtnetlink_send(skb, pid, RTNLGRP_TC, n->nlmsg_flags&NLM_F_ECHO);
820 820
821err_out: 821err_out:
822 kfree_skb(skb); 822 kfree_skb(skb);
@@ -1040,7 +1040,7 @@ static int tclass_notify(struct sk_buff *oskb, struct nlmsghdr *n,
1040 return -EINVAL; 1040 return -EINVAL;
1041 } 1041 }
1042 1042
1043 return rtnetlink_send(skb, pid, RTMGRP_TC, n->nlmsg_flags&NLM_F_ECHO); 1043 return rtnetlink_send(skb, pid, RTNLGRP_TC, n->nlmsg_flags&NLM_F_ECHO);
1044} 1044}
1045 1045
1046struct qdisc_dump_args 1046struct qdisc_dump_args
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index 4d553a1d2169..0579d209af27 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -1125,9 +1125,8 @@ static int xfrm_exp_state_notify(struct xfrm_state *x, struct km_event *c)
1125 if (build_expire(skb, x, c->data.hard) < 0) 1125 if (build_expire(skb, x, c->data.hard) < 0)
1126 BUG(); 1126 BUG();
1127 1127
1128 NETLINK_CB(skb).dst_groups = XFRMGRP_EXPIRE; 1128 NETLINK_CB(skb).dst_group = XFRMNLGRP_EXPIRE;
1129 1129 return netlink_broadcast(xfrm_nl, skb, 0, XFRMNLGRP_EXPIRE, GFP_ATOMIC);
1130 return netlink_broadcast(xfrm_nl, skb, 0, XFRMGRP_EXPIRE, GFP_ATOMIC);
1131} 1130}
1132 1131
1133static int xfrm_notify_sa_flush(struct km_event *c) 1132static int xfrm_notify_sa_flush(struct km_event *c)
@@ -1152,9 +1151,8 @@ static int xfrm_notify_sa_flush(struct km_event *c)
1152 1151
1153 nlh->nlmsg_len = skb->tail - b; 1152 nlh->nlmsg_len = skb->tail - b;
1154 1153
1155 NETLINK_CB(skb).dst_groups = XFRMGRP_SA; 1154 NETLINK_CB(skb).dst_group = XFRMNLGRP_SA;
1156 1155 return netlink_broadcast(xfrm_nl, skb, 0, XFRMNLGRP_SA, GFP_ATOMIC);
1157 return netlink_broadcast(xfrm_nl, skb, 0, XFRMGRP_SA, GFP_ATOMIC);
1158 1156
1159nlmsg_failure: 1157nlmsg_failure:
1160 kfree_skb(skb); 1158 kfree_skb(skb);
@@ -1228,9 +1226,8 @@ static int xfrm_notify_sa(struct xfrm_state *x, struct km_event *c)
1228 1226
1229 nlh->nlmsg_len = skb->tail - b; 1227 nlh->nlmsg_len = skb->tail - b;
1230 1228
1231 NETLINK_CB(skb).dst_groups = XFRMGRP_SA; 1229 NETLINK_CB(skb).dst_group = XFRMNLGRP_SA;
1232 1230 return netlink_broadcast(xfrm_nl, skb, 0, XFRMNLGRP_SA, GFP_ATOMIC);
1233 return netlink_broadcast(xfrm_nl, skb, 0, XFRMGRP_SA, GFP_ATOMIC);
1234 1231
1235nlmsg_failure: 1232nlmsg_failure:
1236rtattr_failure: 1233rtattr_failure:
@@ -1308,9 +1305,8 @@ static int xfrm_send_acquire(struct xfrm_state *x, struct xfrm_tmpl *xt,
1308 if (build_acquire(skb, x, xt, xp, dir) < 0) 1305 if (build_acquire(skb, x, xt, xp, dir) < 0)
1309 BUG(); 1306 BUG();
1310 1307
1311 NETLINK_CB(skb).dst_groups = XFRMGRP_ACQUIRE; 1308 NETLINK_CB(skb).dst_group = XFRMNLGRP_ACQUIRE;
1312 1309 return netlink_broadcast(xfrm_nl, skb, 0, XFRMNLGRP_ACQUIRE, GFP_ATOMIC);
1313 return netlink_broadcast(xfrm_nl, skb, 0, XFRMGRP_ACQUIRE, GFP_ATOMIC);
1314} 1310}
1315 1311
1316/* User gives us xfrm_user_policy_info followed by an array of 0 1312/* User gives us xfrm_user_policy_info followed by an array of 0
@@ -1409,9 +1405,8 @@ static int xfrm_exp_policy_notify(struct xfrm_policy *xp, int dir, struct km_eve
1409 if (build_polexpire(skb, xp, dir, c->data.hard) < 0) 1405 if (build_polexpire(skb, xp, dir, c->data.hard) < 0)
1410 BUG(); 1406 BUG();
1411 1407
1412 NETLINK_CB(skb).dst_groups = XFRMGRP_EXPIRE; 1408 NETLINK_CB(skb).dst_group = XFRMNLGRP_EXPIRE;
1413 1409 return netlink_broadcast(xfrm_nl, skb, 0, XFRMNLGRP_EXPIRE, GFP_ATOMIC);
1414 return netlink_broadcast(xfrm_nl, skb, 0, XFRMGRP_EXPIRE, GFP_ATOMIC);
1415} 1410}
1416 1411
1417static int xfrm_notify_policy(struct xfrm_policy *xp, int dir, struct km_event *c) 1412static int xfrm_notify_policy(struct xfrm_policy *xp, int dir, struct km_event *c)
@@ -1459,9 +1454,8 @@ static int xfrm_notify_policy(struct xfrm_policy *xp, int dir, struct km_event *
1459 1454
1460 nlh->nlmsg_len = skb->tail - b; 1455 nlh->nlmsg_len = skb->tail - b;
1461 1456
1462 NETLINK_CB(skb).dst_groups = XFRMGRP_POLICY; 1457 NETLINK_CB(skb).dst_group = XFRMNLGRP_POLICY;
1463 1458 return netlink_broadcast(xfrm_nl, skb, 0, XFRMNLGRP_POLICY, GFP_ATOMIC);
1464 return netlink_broadcast(xfrm_nl, skb, 0, XFRMGRP_POLICY, GFP_ATOMIC);
1465 1459
1466nlmsg_failure: 1460nlmsg_failure:
1467rtattr_failure: 1461rtattr_failure:
@@ -1486,9 +1480,8 @@ static int xfrm_notify_policy_flush(struct km_event *c)
1486 1480
1487 nlh->nlmsg_len = skb->tail - b; 1481 nlh->nlmsg_len = skb->tail - b;
1488 1482
1489 NETLINK_CB(skb).dst_groups = XFRMGRP_POLICY; 1483 NETLINK_CB(skb).dst_group = XFRMNLGRP_POLICY;
1490 1484 return netlink_broadcast(xfrm_nl, skb, 0, XFRMNLGRP_POLICY, GFP_ATOMIC);
1491 return netlink_broadcast(xfrm_nl, skb, 0, XFRMGRP_POLICY, GFP_ATOMIC);
1492 1485
1493nlmsg_failure: 1486nlmsg_failure:
1494 kfree_skb(skb); 1487 kfree_skb(skb);
diff --git a/security/selinux/netlink.c b/security/selinux/netlink.c
index 0f7be6524555..20f481015db4 100644
--- a/security/selinux/netlink.c
+++ b/security/selinux/netlink.c
@@ -80,8 +80,8 @@ static void selnl_notify(int msgtype, void *data)
80 nlh = NLMSG_PUT(skb, 0, 0, msgtype, len); 80 nlh = NLMSG_PUT(skb, 0, 0, msgtype, len);
81 selnl_add_payload(nlh, len, msgtype, data); 81 selnl_add_payload(nlh, len, msgtype, data);
82 nlh->nlmsg_len = skb->tail - tmp; 82 nlh->nlmsg_len = skb->tail - tmp;
83 NETLINK_CB(skb).dst_groups = SELNL_GRP_AVC; 83 NETLINK_CB(skb).dst_group = SELNLGRP_AVC;
84 netlink_broadcast(selnl, skb, 0, SELNL_GRP_AVC, GFP_USER); 84 netlink_broadcast(selnl, skb, 0, SELNLGRP_AVC, GFP_USER);
85out: 85out:
86 return; 86 return;
87 87