aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
572 struct fib_table *tb; 572 struct fib_table *tb;
573 int err; 573 int err;
574 574
575 if (net != &init_net)
576 return -EINVAL;
577
578 err = rtm_to_fib_config(net, skb, nlh, &cfg); 575 err = rtm_to_fib_config(net, skb, nlh, &cfg);
579 if (err < 0) 576 if (err < 0)
580 goto errout; 577 goto errout;
@@ -597,9 +594,6 @@ static int inet_rtm_newroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *ar
597 struct fib_table *tb; 594 struct fib_table *tb;
598 int err; 595 int err;
599 596
600 if (net != &init_net)
601 return -EINVAL;
602
603 err = rtm_to_fib_config(net, skb, nlh, &cfg); 597 err = rtm_to_fib_config(net, skb, nlh, &cfg);
604 if (err < 0) 598 if (err < 0)
605 goto errout; 599 goto errout;
@@ -625,9 +619,6 @@ static int inet_dump_fib(struct sk_buff *skb, struct netlink_callback *cb)
625 struct hlist_head *head; 619 struct hlist_head *head;
626 int dumped = 0; 620 int dumped = 0;
627 621
628 if (net != &init_net)
629 return 0;
630
631 if (nlmsg_len(cb->nlh) >= sizeof(struct rtmsg) && 622 if (nlmsg_len(cb->nlh) >= sizeof(struct rtmsg) &&
632 ((struct rtmsg *) nlmsg_data(cb->nlh))->rtm_flags & RTM_F_CLONED) 623 ((struct rtmsg *) nlmsg_data(cb->nlh))->rtm_flags & RTM_F_CLONED)
633 return ip_rt_dump(skb, cb); 624 return ip_rt_dump(skb, cb);
@@ -934,9 +925,6 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vo
934 struct net_device *dev = ptr; 925 struct net_device *dev = ptr;
935 struct in_device *in_dev = __in_dev_get_rtnl(dev); 926 struct in_device *in_dev = __in_dev_get_rtnl(dev);
936 927
937 if (dev->nd_net != &init_net)
938 return NOTIFY_DONE;
939
940 if (event == NETDEV_UNREGISTER) { 928 if (event == NETDEV_UNREGISTER) {
941 fib_disable_ip(dev, 2); 929 fib_disable_ip(dev, 2);
942 return NOTIFY_DONE; 930 return NOTIFY_DONE;
@@ -1016,10 +1004,6 @@ static int __net_init fib_net_init(struct net *net)
1016{ 1004{
1017 int error; 1005 int error;
1018 1006
1019 error = 0;
1020 if (net != &init_net)
1021 goto out;
1022
1023 error = ip_fib_net_init(net); 1007 error = ip_fib_net_init(net);
1024 if (error < 0) 1008 if (error < 0)
1025 goto out; 1009 goto out;