From nobody Tue Oct 7 21:25:58 2025 Received: from nbd.name (nbd.name [46.4.11.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B44C156237; Sat, 5 Jul 2025 15:30:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.4.11.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751729451; cv=none; b=odZid3SMbxTMfqEl1AWC+h5WjPEzG40+ARotk4O/gL8SMtsrPhBi/piqIanLGiH/JAGmll6EQ+PW48ilQqtcDTK/ukLOUSyebFt8BqZ45pw2dNu+GJH27kTkxpafYzp0L8fN/V7qPRGjJDVrDgR+ZL6apdzdqcaDBezZEAelIfU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751729451; c=relaxed/simple; bh=unEW3sIR36aqxELmlsnVGBv/VJuyM2kDUpVdW1JPxuo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=JEdg61t4aoLVNqZUUhb7bioNXxIQCb1O++8hZRYOKCUytuaRs/OYjYBMSTHCEZ/ZoKJPlSxLwRglu3XntAFqWki5XJqUSt53VAkw7eeEkEoiu48aqUCzcAro6ghsptlVC7n9EuV7yOTLtO8RmA39e8cIyVQjTQKleioCUqx9c8M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nbd.name; spf=none smtp.mailfrom=nbd.name; dkim=pass (1024-bit key) header.d=nbd.name header.i=@nbd.name header.b=ZMaa7l88; arc=none smtp.client-ip=46.4.11.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nbd.name Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=nbd.name Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nbd.name header.i=@nbd.name header.b="ZMaa7l88" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject: Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=vgrTPih2H6eHiBahUOSiZIhD8AXwhEH/xFNSJMqsRLI=; b=ZMaa7l88kjR7QQnunEOVUYNrEv 112ze6wWFaHDmDwuctN7/jFvnx4SZqfTcJmMmdYxNNoSH2/wEiy+kh+IpOjmxAhP4zvnF6E/h3VFm tpZfkoYEu9DrxQKGf4jzqDmpHPLGE4OMUIntEbM/I26bUsmOxS9sfv93cV5HiMDzNWDQ=; Received: from p5b2062ed.dip0.t-ipconnect.de ([91.32.98.237] helo=MacBookPro.lan) by ds12 with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (Exim 4.96) (envelope-from ) id 1uY4T9-007Yuf-0R; Sat, 05 Jul 2025 17:06:23 +0200 From: Felix Fietkau To: netdev@vger.kernel.org, Eric Dumazet , Neal Cardwell , Kuniyuki Iwashima , "David S. Miller" , David Ahern , Jakub Kicinski , Paolo Abeni , Simon Horman , Willem de Bruijn , Richard Gobert Cc: linux-kernel@vger.kernel.org Subject: [PATCH net] net: fix segmentation after TCP/UDP fraglist GRO Date: Sat, 5 Jul 2025 17:06:21 +0200 Message-ID: <20250705150622.10699-1-nbd@nbd.name> X-Mailer: git-send-email 2.49.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Willem de Bruijn --- net/ipv4/tcp_offload.c | 1 + net/ipv4/udp_offload.c | 1 + 2 files changed, 2 insertions(+) diff --git a/net/ipv4/tcp_offload.c b/net/ipv4/tcp_offload.c index d293087b426d..be5c2294610e 100644 --- a/net/ipv4/tcp_offload.c +++ b/net/ipv4/tcp_offload.c @@ -359,6 +359,7 @@ struct sk_buff *tcp_gro_receive(struct list_head *head,= struct sk_buff *skb, flush |=3D skb->ip_summed !=3D p->ip_summed; flush |=3D skb->csum_level !=3D p->csum_level; flush |=3D NAPI_GRO_CB(p)->count >=3D 64; + skb_set_network_header(skb, skb_gro_receive_network_offset(skb)); =20 if (flush || skb_gro_receive_list(p, skb)) mss =3D 1; diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c index 85b5aa82d7d7..e0a6bfa95118 100644 --- a/net/ipv4/udp_offload.c +++ b/net/ipv4/udp_offload.c @@ -767,6 +767,7 @@ static struct sk_buff *udp_gro_receive_segment(struct l= ist_head *head, NAPI_GRO_CB(skb)->flush =3D 1; return NULL; } + skb_set_network_header(skb, skb_gro_receive_network_offset(skb)); ret =3D skb_gro_receive_list(p, skb); } else { skb_gro_postpull_rcsum(skb, uh, --=20 2.49.0