[openwrt/openwrt] kernel: fix fraglist GRO on linux 6.12

LEDE Commits lede-commits at lists.infradead.org
Sat Jul 5 06:27:14 PDT 2025


nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/604355e8c4d18dda22aeb618c1489c5369860418

commit 604355e8c4d18dda22aeb618c1489c5369860418
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sat Jul 5 13:51:14 2025 +0200

    kernel: fix fraglist GRO on linux 6.12
    
    Merged segments had a broken skb network header offset.
    
    Fixes: https://github.com/openwrt/openwrt/issues/19130
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../680-net-fix-TCP-UDP-fraglist-GRO.patch         | 35 ++++++++++++++++++++++
 ...et-add-missing-check-for-TCP-fraglist-GRO.patch |  2 +-
 2 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/target/linux/generic/pending-6.12/680-net-fix-TCP-UDP-fraglist-GRO.patch b/target/linux/generic/pending-6.12/680-net-fix-TCP-UDP-fraglist-GRO.patch
new file mode 100644
index 0000000000..221e2708ec
--- /dev/null
+++ b/target/linux/generic/pending-6.12/680-net-fix-TCP-UDP-fraglist-GRO.patch
@@ -0,0 +1,35 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Sat, 5 Jul 2025 13:44:10 +0200
+Subject: [PATCH] net: fix TCP/UDP fraglist GRO
+
+Since "net: gro: use cb instead of skb->network_header", the skb network
+header is no longer set in the GRO path.
+This breaks fraglist segmentation, which relies on ip_hdr()/tcp_hdr()
+to check for address/port changes.
+Fix this regression by selectively setting the network header for merged
+segment skbs.
+
+Fixes: 186b1ea73ad8 ("net: gro: use cb instead of skb->network_header")
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/net/ipv4/tcp_offload.c
++++ b/net/ipv4/tcp_offload.c
+@@ -355,6 +355,7 @@ struct sk_buff *tcp_gro_receive(struct l
+ 		flush |= skb->ip_summed != p->ip_summed;
+ 		flush |= skb->csum_level != p->csum_level;
+ 		flush |= NAPI_GRO_CB(p)->count >= 64;
++		skb_set_network_header(skb, skb_gro_receive_network_offset(skb));
+ 
+ 		if (flush || skb_gro_receive_list(p, skb))
+ 			mss = 1;
+--- a/net/ipv4/udp_offload.c
++++ b/net/ipv4/udp_offload.c
+@@ -604,6 +604,7 @@ static struct sk_buff *udp_gro_receive_s
+ 					NAPI_GRO_CB(skb)->flush = 1;
+ 					return NULL;
+ 				}
++				skb_set_network_header(skb, skb_gro_receive_network_offset(skb));
+ 				ret = skb_gro_receive_list(p, skb);
+ 			} else {
+ 				skb_gro_postpull_rcsum(skb, uh,
diff --git a/target/linux/generic/pending-6.12/690-net-add-missing-check-for-TCP-fraglist-GRO.patch b/target/linux/generic/pending-6.12/690-net-add-missing-check-for-TCP-fraglist-GRO.patch
index b404037915..2cf8cf159f 100644
--- a/target/linux/generic/pending-6.12/690-net-add-missing-check-for-TCP-fraglist-GRO.patch
+++ b/target/linux/generic/pending-6.12/690-net-add-missing-check-for-TCP-fraglist-GRO.patch
@@ -22,5 +22,5 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		flush |= skb->csum_level != p->csum_level;
 +		flush |= !pskb_may_pull(skb, skb_gro_offset(skb));
  		flush |= NAPI_GRO_CB(p)->count >= 64;
+ 		skb_set_network_header(skb, skb_gro_receive_network_offset(skb));
  
- 		if (flush || skb_gro_receive_list(p, skb))




More information about the lede-commits mailing list