]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
committerRoxana Nicolescu <roxana.nicolescu@canonical.com>
Fri, 2 Aug 2024 14:26:54 +0000 (16:26 +0200)
commit87c8632e830030e8b284dfcab37b664af3f2ae97
treed97f09f8dc410fdc335565691e0ddd9fd1fe56ae
parentc7974f98ad0d84163b35837b1c04c2a4d73e2845
geneve: Fix incorrect inner network header offset when innerprotoinherit is set

BugLink: https://bugs.launchpad.net/bugs/2074091
[ 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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Portia Stephens <portia.stephens@canonical.com>
Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
drivers/net/geneve.c
include/net/ip_tunnels.h