[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>
This commit is contained in:

committed by
David S. Miller

parent
b854272b3c
commit
97c53cacf0
@@ -1049,7 +1049,8 @@ static void ndisc_ra_useropt(struct sk_buff *ra, struct nd_opt_hdr *opt)
|
||||
&ipv6_hdr(ra)->saddr);
|
||||
nlmsg_end(skb, nlh);
|
||||
|
||||
err = rtnl_notify(skb, 0, RTNLGRP_ND_USEROPT, NULL, GFP_ATOMIC);
|
||||
err = rtnl_notify(skb, &init_net, 0, RTNLGRP_ND_USEROPT, NULL,
|
||||
GFP_ATOMIC);
|
||||
if (err < 0)
|
||||
goto errout;
|
||||
|
||||
@@ -1059,7 +1060,7 @@ nla_put_failure:
|
||||
nlmsg_free(skb);
|
||||
err = -EMSGSIZE;
|
||||
errout:
|
||||
rtnl_set_sk_err(RTNLGRP_ND_USEROPT, err);
|
||||
rtnl_set_sk_err(&init_net, RTNLGRP_ND_USEROPT, err);
|
||||
}
|
||||
|
||||
static void ndisc_router_discovery(struct sk_buff *skb)
|
||||
|
Reference in New Issue
Block a user