]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: Handle l3mdev in ip_tunnel_init_flow
authorDavid Ahern <dsahern@kernel.org>
Wed, 13 Apr 2022 17:43:20 +0000 (11:43 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:12:01 +0000 (15:12 +0200)
commit760852df570747e500a9632d34cbbf4faef30855
treebfb77d994fa2c97417eb65fbb6d92121eccc8916
parent9476ecd7f7b8df773ac8048e7ebb916c64261204
net: Handle l3mdev in ip_tunnel_init_flow

commit db53cd3d88dc328dea2e968c9c8d3b4294a8a674 upstream.

Ido reported that the commit referenced in the Fixes tag broke
a gre use case with dummy devices. Add a check to ip_tunnel_init_flow
to see if the oif is an l3mdev port and if so set the oif to 0 to
avoid the oif comparison in fib_lookup_good_nhc.

Fixes: 40867d74c374 ("net: Add l3mdev index to flow struct and avoid oif reset for port devices")
Reported-by: Ido Schimmel <idosch@idosch.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>
drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c
include/net/ip_tunnels.h
net/ipv4/ip_gre.c
net/ipv4/ip_tunnel.c