diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 758acec80389a9977b1c9a4dd3fa96eafbf1fc5d..f74b7513d607af4b4e33614646ffe95edcfe8af2 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -2629,10 +2629,12 @@ struct rtable *ip_route_output_flow(struct net *net, struct flowi4 *flp4, if (IS_ERR(rt)) return rt; - if (flp4->flowi4_proto) + if (flp4->flowi4_proto) { + flp4->flowi4_oif = rt->dst.dev->ifindex; rt = (struct rtable *)xfrm_lookup_route(net, &rt->dst, flowi4_to_flowi(flp4), sk, 0); + } return rt; }