kernel: mtk_eth_soc: fix encapsulation check for GSO fraglist packets
authorFelix Fietkau <[email protected]>
Thu, 13 Nov 2025 13:23:07 +0000 (13:23 +0000)
committerFelix Fietkau <[email protected]>
Thu, 13 Nov 2025 13:24:38 +0000 (14:24 +0100)
Use skb->encapsulation flag instead of skb_tnl_header_len() to detect
encapsulated packets. Prevents false positives on non-encapsulated packets.

Reported-by: Mason-cw Chang (張哲維) <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
target/linux/generic/pending-6.12/732-05-net-ethernet-mtk_eth_soc-add-support-for-sending-fra.patch

index c62c547443fd72565788219a12b532f06080161a..8dad080fa62ccb0101192b12dc67cf0db7c852f1 100644 (file)
@@ -427,7 +427,7 @@ Signed-off-by: Felix Fietkau <[email protected]>
 +      if (!(skb_shinfo(skb)->gso_type & SKB_GSO_FRAGLIST))
 +              return true;
 +
-+      if (skb_tnl_header_len(skb))
++      if (skb->encapsulation)
 +              return false;
 +
 +      return skb_pagelen(skb) - header_len == skb_shinfo(skb)->gso_size &&