ipv4: Restore flowi4_oif update before call to xfrm_lookup_route
authorDavid Ahern <dsahern@kernel.org>
Fri, 9 Oct 2020 18:01:01 +0000 (11:01 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 08:06:58 +0000 (09:06 +0100)
commitf6b47285c4a47f9d8ad9a29161f0df2fdd40e432
tree9e6db913f07379c59744320beb4a4df5a173f7a1
parentcc8a5643ede8837bd851bb679b087ff0fa715395
ipv4: Restore flowi4_oif update before call to xfrm_lookup_route

[ Upstream commit 874fb9e2ca949b443cc419a4f2227cafd4381d39 ]

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: 2fbc6e89b2f1 ("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>
net/ipv4/route.c