]> git.baikalelectronics.ru Git - kernel.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)
committerJakub Kicinski <kuba@kernel.org>
Fri, 15 Apr 2022 21:27:30 +0000 (14:27 -0700)
commit9dfa1845a363effba48431d7661c4721f3d4215b
treea4478d8286c17d1a9a228a07ac69aac30e6e4563
parente62f81601328bcda8c0549f3daf0bfdb1de52b47
net: Handle l3mdev in ip_tunnel_init_flow

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: 67bf7ede1f3e ("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>
drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c
include/net/ip_tunnels.h
net/ipv4/ip_gre.c
net/ipv4/ip_tunnel.c