Skip to content

Commit

Permalink
[NETNS]: Pass correct namespace in ip_rt_get_source.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Denis V. Lunev authored and David S. Miller committed Jan 28, 2008
1 parent 84a885f commit ecfdc8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -1559,7 +1559,7 @@ void ip_rt_get_source(u8 *addr, struct rtable *rt)

if (rt->fl.iif == 0)
src = rt->rt_src;
else if (fib_lookup(&init_net, &rt->fl, &res) == 0) {
else if (fib_lookup(rt->u.dst.dev->nd_net, &rt->fl, &res) == 0) {
src = FIB_RES_PREFSRC(res);
fib_res_put(&res);
} else
Expand Down

0 comments on commit ecfdc8c

Please sign in to comment.