aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/addrconf.c
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2007-11-20 01:26:51 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:54:25 -0500
commit97c53cacf00d1f5aa04adabfebcc806ca8b22b10 (patch)
tree6b7223df312aa27a5017c4d7c4d1e500a33ed8d8 /net/ipv6/addrconf.c
parentb854272b3c732316676e9128f7b9e6f1e1ff88b0 (diff)
[NET]: Make rtnetlink infrastructure network namespace aware (v3)
After this patch none of the netlink callback support anything except the initial network namespace but the rtnetlink infrastructure now handles multiple network namespaces. Changes from v2: - IPv6 addrlabel processing Changes from v1: - no need for special rtnl_unlock handling - fixed IPv6 ndisc Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r--net/ipv6/addrconf.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 26de8ee5095b..6c8b193474ba 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -3397,7 +3397,7 @@ static int inet6_rtm_getaddr(struct sk_buff *in_skb, struct nlmsghdr* nlh,
3397 kfree_skb(skb); 3397 kfree_skb(skb);
3398 goto errout_ifa; 3398 goto errout_ifa;
3399 } 3399 }
3400 err = rtnl_unicast(skb, NETLINK_CB(in_skb).pid); 3400 err = rtnl_unicast(skb, &init_net, NETLINK_CB(in_skb).pid);
3401errout_ifa: 3401errout_ifa:
3402 in6_ifa_put(ifa); 3402 in6_ifa_put(ifa);
3403errout: 3403errout:
@@ -3420,10 +3420,10 @@ static void inet6_ifa_notify(int event, struct inet6_ifaddr *ifa)
3420 kfree_skb(skb); 3420 kfree_skb(skb);
3421 goto errout; 3421 goto errout;
3422 } 3422 }
3423 err = rtnl_notify(skb, 0, RTNLGRP_IPV6_IFADDR, NULL, GFP_ATOMIC); 3423 err = rtnl_notify(skb, &init_net, 0, RTNLGRP_IPV6_IFADDR, NULL, GFP_ATOMIC);
3424errout: 3424errout:
3425 if (err < 0) 3425 if (err < 0)
3426 rtnl_set_sk_err(RTNLGRP_IPV6_IFADDR, err); 3426 rtnl_set_sk_err(&init_net, RTNLGRP_IPV6_IFADDR, err);
3427} 3427}
3428 3428
3429static inline void ipv6_store_devconf(struct ipv6_devconf *cnf, 3429static inline void ipv6_store_devconf(struct ipv6_devconf *cnf,
@@ -3628,10 +3628,10 @@ void inet6_ifinfo_notify(int event, struct inet6_dev *idev)
3628 kfree_skb(skb); 3628 kfree_skb(skb);
3629 goto errout; 3629 goto errout;
3630 } 3630 }
3631 err = rtnl_notify(skb, 0, RTNLGRP_IPV6_IFADDR, NULL, GFP_ATOMIC); 3631 err = rtnl_notify(skb, &init_net, 0, RTNLGRP_IPV6_IFADDR, NULL, GFP_ATOMIC);
3632errout: 3632errout:
3633 if (err < 0) 3633 if (err < 0)
3634 rtnl_set_sk_err(RTNLGRP_IPV6_IFADDR, err); 3634 rtnl_set_sk_err(&init_net, RTNLGRP_IPV6_IFADDR, err);
3635} 3635}
3636 3636
3637static inline size_t inet6_prefix_nlmsg_size(void) 3637static inline size_t inet6_prefix_nlmsg_size(void)
@@ -3697,10 +3697,10 @@ static void inet6_prefix_notify(int event, struct inet6_dev *idev,
3697 kfree_skb(skb); 3697 kfree_skb(skb);
3698 goto errout; 3698 goto errout;
3699 } 3699 }
3700 err = rtnl_notify(skb, 0, RTNLGRP_IPV6_PREFIX, NULL, GFP_ATOMIC); 3700 err = rtnl_notify(skb, &init_net, 0, RTNLGRP_IPV6_PREFIX, NULL, GFP_ATOMIC);
3701errout: 3701errout:
3702 if (err < 0) 3702 if (err < 0)
3703 rtnl_set_sk_err(RTNLGRP_IPV6_PREFIX, err); 3703 rtnl_set_sk_err(&init_net, RTNLGRP_IPV6_PREFIX, err);
3704} 3704}
3705 3705
3706static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp) 3706static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)