Commit 9f735b6f authored by Felix Fietkau's avatar Felix Fietkau Committed by Paolo Abeni
Browse files

net: fix segmentation after 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: 186b1ea7 ("net: gro: use cb instead of skb->network_header")
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
Reviewed-by: default avatarWillem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20250705150622.10699-1-nbd@nbd.name


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent ae3264a2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -359,6 +359,7 @@ struct sk_buff *tcp_gro_receive(struct list_head *head, struct sk_buff *skb,
		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;
+1 −0
Original line number Diff line number Diff line
@@ -767,6 +767,7 @@ static struct sk_buff *udp_gro_receive_segment(struct list_head *head,
					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,