]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
geneve: Fix incorrect inner network header offset when innerprotoinherit is set
authorGal Pressman <gal@nvidia.com>
Thu, 6 Jun 2024 20:32:48 +0000 (23:32 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:10:47 +0000 (15:10 +0200)
commitb293c9d814733f3dde5c104e1f56ada450d440d3
treeef1f4778557d5cd97e453b41ffa8a1493cd3a50e
parent446f84d3a74d32f86a6b225d3c536a66b1d6624d
geneve: Fix incorrect inner network header offset when innerprotoinherit is set

[ Upstream commit c6ae073f5903f6c6439d0ac855836a4da5c0a701 ]

When innerprotoinherit is set, the tunneled packets do not have an inner
Ethernet header.
Change 'maclen' to not always assume the header length is ETH_HLEN, as
there might not be a MAC header.

This resolves issues with drivers (e.g. mlx5, in
mlx5e_tx_tunnel_accel()) who rely on the skb inner network header offset
to be correct, and use it for TX offloads.

Fixes: d8a6213d70ac ("geneve: fix header validation in geneve[6]_xmit_skb")
Signed-off-by: Gal Pressman <gal@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: c471236b2359 ("bareudp: Pull inner IP header on xmit.")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/geneve.c
include/net/ip_tunnels.h