Commit 226b0b4a authored by Denis V. Lunev's avatar Denis V. Lunev Committed by David S. Miller

[NETNS]: Replace init_net with the correct context in fib_frontend.c

Acked-by: default avatarBenjamin Thery <benjamin.thery@bull.net>
Acked-by: default avatarDaniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: default avatarDenis V. Lunev <den@openvz.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1bad118a
...@@ -604,7 +604,7 @@ static int inet_rtm_newroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *ar ...@@ -604,7 +604,7 @@ static int inet_rtm_newroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *ar
if (err < 0) if (err < 0)
goto errout; goto errout;
tb = fib_new_table(&init_net, cfg.fc_table); tb = fib_new_table(net, cfg.fc_table);
if (tb == NULL) { if (tb == NULL) {
err = -ENOBUFS; err = -ENOBUFS;
goto errout; goto errout;
...@@ -794,7 +794,7 @@ static void fib_del_ifaddr(struct in_ifaddr *ifa) ...@@ -794,7 +794,7 @@ static void fib_del_ifaddr(struct in_ifaddr *ifa)
fib_magic(RTM_DELROUTE, RTN_LOCAL, ifa->ifa_local, 32, prim); fib_magic(RTM_DELROUTE, RTN_LOCAL, ifa->ifa_local, 32, prim);
/* Check, that this local address finally disappeared. */ /* Check, that this local address finally disappeared. */
if (inet_addr_type(&init_net, ifa->ifa_local) != RTN_LOCAL) { if (inet_addr_type(dev->nd_net, ifa->ifa_local) != RTN_LOCAL) {
/* And the last, but not the least thing. /* And the last, but not the least thing.
We must flush stray FIB entries. We must flush stray FIB entries.
...@@ -802,7 +802,7 @@ static void fib_del_ifaddr(struct in_ifaddr *ifa) ...@@ -802,7 +802,7 @@ static void fib_del_ifaddr(struct in_ifaddr *ifa)
for stray nexthop entries, then ignite fib_flush. for stray nexthop entries, then ignite fib_flush.
*/ */
if (fib_sync_down(ifa->ifa_local, NULL, 0)) if (fib_sync_down(ifa->ifa_local, NULL, 0))
fib_flush(&init_net); fib_flush(dev->nd_net);
} }
} }
#undef LOCAL_OK #undef LOCAL_OK
...@@ -897,7 +897,7 @@ static void nl_fib_lookup_exit(struct net *net) ...@@ -897,7 +897,7 @@ static void nl_fib_lookup_exit(struct net *net)
static void fib_disable_ip(struct net_device *dev, int force) static void fib_disable_ip(struct net_device *dev, int force)
{ {
if (fib_sync_down(0, dev, force)) if (fib_sync_down(0, dev, force))
fib_flush(&init_net); fib_flush(dev->nd_net);
rt_cache_flush(0); rt_cache_flush(0);
arp_ifdown(dev); arp_ifdown(dev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment