Skip to content

Commit 540718f

Browse files
dsaherngregkh
authored andcommitted
ipv4: Restore flowi4_oif update before call to xfrm_lookup_route
[ Upstream commit 874fb9e ] Tobias reported regressions in IPsec tests following the patch referenced by the Fixes tag below. The root cause is dropping the reset of the flowi4_oif after the fib_lookup. Apparently it is needed for xfrm cases, so restore the oif update to ip_route_output_flow right before the call to xfrm_lookup_route. Fixes: 2fbc6e8 ("ipv4: Update exception handling for multipath routes via same device") Reported-by: Tobias Brunner <tobias@strongswan.org> Signed-off-by: David Ahern <dsahern@kernel.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 3eb6800 commit 540718f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

net/ipv4/route.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2769,10 +2769,12 @@ struct rtable *ip_route_output_flow(struct net *net, struct flowi4 *flp4,
27692769
if (IS_ERR(rt))
27702770
return rt;
27712771

2772-
if (flp4->flowi4_proto)
2772+
if (flp4->flowi4_proto) {
2773+
flp4->flowi4_oif = rt->dst.dev->ifindex;
27732774
rt = (struct rtable *)xfrm_lookup_route(net, &rt->dst,
27742775
flowi4_to_flowi(flp4),
27752776
sk, 0);
2777+
}
27762778

27772779
return rt;
27782780
}

0 commit comments

Comments
 (0)