Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ecfdc8c5 authored by Denis V. Lunev's avatar Denis V. Lunev Committed by David S. Miller
Browse files

[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: default avatarDenis V. Lunev <den@openvz.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 84a885f4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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