]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ip_tunnels: allow VXLAN/GENEVE to inherit TOS/TTL from VLAN
authorMatthias May <matthias.may@westermo.com>
Thu, 21 Jul 2022 20:27:19 +0000 (22:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Jun 2023 08:18:37 +0000 (10:18 +0200)
commit18a0202bec178466c7eb19f76dd6178291c8b593
tree79bdaa00c680b8db19cc3224faa47f55fdf3b3ff
parentab530c9bec51620bc9a617b1dedf9cba3191c224
ip_tunnels: allow VXLAN/GENEVE to inherit TOS/TTL from VLAN

commit 7074732c8faee201a245a6f983008a5789c0be33 upstream.

The current code allows for VXLAN and GENEVE to inherit the TOS
respective the TTL when skb-protocol is ETH_P_IP or ETH_P_IPV6.
However when the payload is VLAN encapsulated, then this inheriting
does not work, because the visible skb-protocol is of type
ETH_P_8021Q or ETH_P_8021AD.

Instead of skb->protocol use skb_protocol().

Signed-off-by: Matthias May <matthias.may@westermo.com>
Link: https://lore.kernel.org/r/20220721202718.10092-1-matthias.may@westermo.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Cc: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/net/ip_tunnels.h