diff --git a/net/ipv4/route.c b/net/ipv4/route.c index f988ae39c4c2becc98fc4dcee108101dfd8e5a1e..27e0f81060a7f97a9e4a1a169806f180f7dcc543 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) 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