summaryrefslogtreecommitdiffstats
path: root/net/ipv4/fib_frontend.c
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-01-10 03:30:49 -0800
committerDavid S. Miller <davem@davemloft.net>2008-01-28 15:01:35 -0800
commit8cced9eff1d413c28efac9c5ac5a75793c9251cf (patch)
tree835e601f8d1231b36529f08d91126dd9fa88931a /net/ipv4/fib_frontend.c
parent226b0b4a51d1cc09928e569b121ca0abe2839169 (diff)
downloadblackbird-op-linux-8cced9eff1d413c28efac9c5ac5a75793c9251cf.tar.gz
blackbird-op-linux-8cced9eff1d413c28efac9c5ac5a75793c9251cf.zip
[NETNS]: Enable routing configuration in non-initial namespace.
I.e. remove the net != &init_net checks from the places, that now can handle other-than-init net namespace. Acked-by: Benjamin Thery <benjamin.thery@bull.net> Acked-by: Daniel Lezcano <dlezcano@fr.ibm.com> Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fib_frontend.c')
-rw-r--r--net/ipv4/fib_frontend.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index 82109f13d57b..64421c520a0e 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -572,9 +572,6 @@ static int inet_rtm_delroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *ar
struct fib_table *tb;
int err;
- if (net != &init_net)
- return -EINVAL;
-
err = rtm_to_fib_config(net, skb, nlh, &cfg);
if (err < 0)
goto errout;
@@ -597,9 +594,6 @@ static int inet_rtm_newroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *ar
struct fib_table *tb;
int err;
- if (net != &init_net)
- return -EINVAL;
-
err = rtm_to_fib_config(net, skb, nlh, &cfg);
if (err < 0)
goto errout;
@@ -625,9 +619,6 @@ static int inet_dump_fib(struct sk_buff *skb, struct netlink_callback *cb)
struct hlist_head *head;
int dumped = 0;
- if (net != &init_net)
- return 0;
-
if (nlmsg_len(cb->nlh) >= sizeof(struct rtmsg) &&
((struct rtmsg *) nlmsg_data(cb->nlh))->rtm_flags & RTM_F_CLONED)
return ip_rt_dump(skb, cb);
@@ -934,9 +925,6 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vo
struct net_device *dev = ptr;
struct in_device *in_dev = __in_dev_get_rtnl(dev);
- if (dev->nd_net != &init_net)
- return NOTIFY_DONE;
-
if (event == NETDEV_UNREGISTER) {
fib_disable_ip(dev, 2);
return NOTIFY_DONE;
@@ -1016,10 +1004,6 @@ static int __net_init fib_net_init(struct net *net)
{
int error;
- error = 0;
- if (net != &init_net)
- goto out;
-
error = ip_fib_net_init(net);
if (error < 0)
goto out;
OpenPOWER on IntegriCloud