diff options
author | Denis V. Lunev <den@openvz.org> | 2008-01-21 20:35:06 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:10:23 -0500 |
commit | ecfdc8c5424079393a9b05e8a5aaf5c6873029f6 (patch) | |
tree | e15ed74491e1bcfbfe5cee1d7964e5c334663ea2 /net/ipv4 | |
parent | 84a885f44961c17a91cae9a9c03e4b3dae5d8d94 (diff) |
[NETNS]: Pass correct namespace in ip_rt_get_source.
ip_rt_get_source is the infamous place for which dst_ifdown kludges
have been implemented. This means that rt->u.dst.dev can be safely
dereferrenced obtain nd_net.
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/route.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index f988ae39c4c2..27e0f81060a7 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -1559,7 +1559,7 @@ void ip_rt_get_source(u8 *addr, struct rtable *rt) | |||
1559 | 1559 | ||
1560 | if (rt->fl.iif == 0) | 1560 | if (rt->fl.iif == 0) |
1561 | src = rt->rt_src; | 1561 | src = rt->rt_src; |
1562 | else if (fib_lookup(&init_net, &rt->fl, &res) == 0) { | 1562 | else if (fib_lookup(rt->u.dst.dev->nd_net, &rt->fl, &res) == 0) { |
1563 | src = FIB_RES_PREFSRC(res); | 1563 | src = FIB_RES_PREFSRC(res); |
1564 | fib_res_put(&res); | 1564 | fib_res_put(&res); |
1565 | } else | 1565 | } else |