提交 3776c889 编写于 作者: D Denis V. Lunev 提交者: David S. Miller

[NETNS]: Enable IPv4 address manipulations inside namespace.

Signed-off-by: NDenis V. Lunev <den@openvz.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1937504d
...@@ -446,9 +446,6 @@ static int inet_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg ...@@ -446,9 +446,6 @@ static int inet_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg
ASSERT_RTNL(); ASSERT_RTNL();
if (net != &init_net)
return -EINVAL;
err = nlmsg_parse(nlh, sizeof(*ifm), tb, IFA_MAX, ifa_ipv4_policy); err = nlmsg_parse(nlh, sizeof(*ifm), tb, IFA_MAX, ifa_ipv4_policy);
if (err < 0) if (err < 0)
goto errout; goto errout;
...@@ -560,9 +557,6 @@ static int inet_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg ...@@ -560,9 +557,6 @@ static int inet_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg
ASSERT_RTNL(); ASSERT_RTNL();
if (net != &init_net)
return -EINVAL;
ifa = rtm_to_ifaddr(net, nlh); ifa = rtm_to_ifaddr(net, nlh);
if (IS_ERR(ifa)) if (IS_ERR(ifa))
return PTR_ERR(ifa); return PTR_ERR(ifa);
...@@ -1170,9 +1164,6 @@ static int inet_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb) ...@@ -1170,9 +1164,6 @@ static int inet_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb)
struct in_ifaddr *ifa; struct in_ifaddr *ifa;
int s_ip_idx, s_idx = cb->args[0]; int s_ip_idx, s_idx = cb->args[0];
if (net != &init_net)
return 0;
s_ip_idx = ip_idx = cb->args[1]; s_ip_idx = ip_idx = cb->args[1];
idx = 0; idx = 0;
for_each_netdev(net, dev) { for_each_netdev(net, dev) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册