net: correctly handle tunneled traffic on IPV6_CSUM GSO fallback
authorWillem de Bruijn <willemb@google.com>
Fri, 20 Mar 2026 19:01:46 +0000 (15:01 -0400)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 24 Mar 2026 11:35:19 +0000 (12:35 +0100)
commitc4336a07eb6b2526dc2b62928b5104b41a7f81f5
tree1ec6db872b59a5aea27c23dc1010b452960441fa
parentd9c2a509c96378d77435e5845561c4afd3eaedad
net: correctly handle tunneled traffic on IPV6_CSUM GSO fallback

NETIF_F_IPV6_CSUM only advertises support for checksum offload of
packets without IPv6 extension headers. Packets with extension
headers must fall back onto software checksumming. Since TSO
depends on checksum offload, those must revert to GSO.

The below commit introduces that fallback. It always checks
network header length. For tunneled packets, the inner header length
must be checked instead. Extend the check accordingly.

A special case is tunneled packets without inner IP protocol. Such as
RFC 6951 SCTP in UDP. Those are not standard IPv6 followed by
transport header either, so also must revert to the software GSO path.

Cc: stable@vger.kernel.org
Fixes: 864e3396976e ("net: gso: Forbid IPv6 TSO with extensions on devices with only IPV6_CSUM")
Reported-by: Tangxin Xie <xietangxin@yeah.net>
Closes: https://lore.kernel.org/netdev/0414e7e2-9a1c-4d7c-a99d-b9039cf68f40@yeah.net/
Suggested-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20260320190148.2409107-1-willemdebruijn.kernel@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/core/dev.c