aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/devinet.c
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-02-28 23:52:25 -0500
committerDavid S. Miller <davem@davemloft.net>2008-02-28 23:52:25 -0500
commit3776c8891a2d3c5892fa50ab9e2a3b68f5674be6 (patch)
tree2af79954a2f3867ce1a55872ad0c2a0348ed1de9 /net/ipv4/devinet.c
parent1937504dd156573a1883f10a5a167f3f78c6cb4a (diff)
[NETNS]: Enable IPv4 address manipulations inside namespace.
Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/devinet.c')
-rw-r--r--net/ipv4/devinet.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index af752fc5d0ab..dfae59bfaa2c 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -446,9 +446,6 @@ static int inet_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg
446 446
447 ASSERT_RTNL(); 447 ASSERT_RTNL();
448 448
449 if (net != &init_net)
450 return -EINVAL;
451
452 err = nlmsg_parse(nlh, sizeof(*ifm), tb, IFA_MAX, ifa_ipv4_policy); 449 err = nlmsg_parse(nlh, sizeof(*ifm), tb, IFA_MAX, ifa_ipv4_policy);
453 if (err < 0) 450 if (err < 0)
454 goto errout; 451 goto errout;
@@ -560,9 +557,6 @@ static int inet_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg
560 557
561 ASSERT_RTNL(); 558 ASSERT_RTNL();
562 559
563 if (net != &init_net)
564 return -EINVAL;
565
566 ifa = rtm_to_ifaddr(net, nlh); 560 ifa = rtm_to_ifaddr(net, nlh);
567 if (IS_ERR(ifa)) 561 if (IS_ERR(ifa))
568 return PTR_ERR(ifa); 562 return PTR_ERR(ifa);
@@ -1170,9 +1164,6 @@ static int inet_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb)
1170 struct in_ifaddr *ifa; 1164 struct in_ifaddr *ifa;
1171 int s_ip_idx, s_idx = cb->args[0]; 1165 int s_ip_idx, s_idx = cb->args[0];
1172 1166
1173 if (net != &init_net)
1174 return 0;
1175
1176 s_ip_idx = ip_idx = cb->args[1]; 1167 s_ip_idx = ip_idx = cb->args[1];
1177 idx = 0; 1168 idx = 0;
1178 for_each_netdev(net, dev) { 1169 for_each_netdev(net, dev) {