]> 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)
commit361775163b70835cc127ce27a33492eaa3f4629f
treea4478d8286c17d1a9a228a07ac69aac30e6e4563
parent21c9da2423d5a8eddc8fa74539511b44d32196a8
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: 97b73ebd80c7 ("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