diff options
author | Denis V. Lunev <den@openvz.org> | 2008-01-10 06:30:24 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:01:34 -0500 |
commit | 226b0b4a51d1cc09928e569b121ca0abe2839169 (patch) | |
tree | af2768bcdcb31601d125d45bdebb2e611345d661 /net/ipv4/fib_frontend.c | |
parent | 1bad118a330d494b23663fce94d4e9d9d5065fa7 (diff) |
[NETNS]: Replace init_net with the correct context in fib_frontend.c
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.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index 15909a9fa9b2..82109f13d57b 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c | |||
@@ -604,7 +604,7 @@ static int inet_rtm_newroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *ar | |||
604 | if (err < 0) | 604 | if (err < 0) |
605 | goto errout; | 605 | goto errout; |
606 | 606 | ||
607 | tb = fib_new_table(&init_net, cfg.fc_table); | 607 | tb = fib_new_table(net, cfg.fc_table); |
608 | if (tb == NULL) { | 608 | if (tb == NULL) { |
609 | err = -ENOBUFS; | 609 | err = -ENOBUFS; |
610 | goto errout; | 610 | goto errout; |
@@ -794,7 +794,7 @@ static void fib_del_ifaddr(struct in_ifaddr *ifa) | |||
794 | fib_magic(RTM_DELROUTE, RTN_LOCAL, ifa->ifa_local, 32, prim); | 794 | fib_magic(RTM_DELROUTE, RTN_LOCAL, ifa->ifa_local, 32, prim); |
795 | 795 | ||
796 | /* Check, that this local address finally disappeared. */ | 796 | /* Check, that this local address finally disappeared. */ |
797 | if (inet_addr_type(&init_net, ifa->ifa_local) != RTN_LOCAL) { | 797 | if (inet_addr_type(dev->nd_net, ifa->ifa_local) != RTN_LOCAL) { |
798 | /* And the last, but not the least thing. | 798 | /* And the last, but not the least thing. |
799 | We must flush stray FIB entries. | 799 | We must flush stray FIB entries. |
800 | 800 | ||
@@ -802,7 +802,7 @@ static void fib_del_ifaddr(struct in_ifaddr *ifa) | |||
802 | for stray nexthop entries, then ignite fib_flush. | 802 | for stray nexthop entries, then ignite fib_flush. |
803 | */ | 803 | */ |
804 | if (fib_sync_down(ifa->ifa_local, NULL, 0)) | 804 | if (fib_sync_down(ifa->ifa_local, NULL, 0)) |
805 | fib_flush(&init_net); | 805 | fib_flush(dev->nd_net); |
806 | } | 806 | } |
807 | } | 807 | } |
808 | #undef LOCAL_OK | 808 | #undef LOCAL_OK |
@@ -897,7 +897,7 @@ static void nl_fib_lookup_exit(struct net *net) | |||
897 | static void fib_disable_ip(struct net_device *dev, int force) | 897 | static void fib_disable_ip(struct net_device *dev, int force) |
898 | { | 898 | { |
899 | if (fib_sync_down(0, dev, force)) | 899 | if (fib_sync_down(0, dev, force)) |
900 | fib_flush(&init_net); | 900 | fib_flush(dev->nd_net); |
901 | rt_cache_flush(0); | 901 | rt_cache_flush(0); |
902 | arp_ifdown(dev); | 902 | arp_ifdown(dev); |
903 | } | 903 | } |