๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #19045

Re: [PATCH nf] ipv4: fix conntrack defrag forwarding after ip_frag_reinit()

#19045
From: Eric Dumazet
Date: Thu, 19 Nov 2026 08:40
28 lines
10012 bytes
Le jeu. 19 nov. 2026 ร  07:18, Jiayuan Chen <jiayuan.chen@linux.dev> a รฉcrit :
>
> q.max_size and max_df_size are used by ip_frag_reasm() to set
> IPCB(skb)->frag_max_size and the DF bit of the reassembled packet.
>
> ip_frag_reinit() reuses the queue for a new datagram but does not
> reset them, so the new datagram inherits them from the old one.
>
> On a router with conntrack defrag, if the largest fragment of the old
> datagram had DF set and was larger than the egress MTU, a new datagram
> without DF gets DF set after reassembly and is rejected with
> ICMP_FRAG_NEEDED, even though all its fragments fit.
>
> Reset both fields.
>
> Fixes: 5f2d04f1f9b5 ("ipv4: fix path MTU discovery with connection tracking")
> Fixes: d6b915e29f4a ("ip_fragment: don't forward defragmented DF packet")
> Signed-off-by: Jiayuan Chen <jiayuan.chen@linux.dev>

This only touches net/ipv4/ip_fragment.c, so this should target
the net tree ([PATCH net]), not nf.

Reviewed-by: Eric Dumazet <edumazet@kernel.org>

Thanks.
Technical Details
Message-ID: <CAL4Wiioj+Lg8=PyAqLVRLG+uhewDWjaDbk1F=a3woEB+BETkmw@mail.gmail.com>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366856-linux-kernel-netdev=dewy.ru
References: <20261119061751.222641-1-jiayuan.chen@linux.dev>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366856-linux-kernel-netdev=dewy.ru
From: edumazet@kernel.org (Eric Dumazet)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH nf] ipv4: fix conntrack defrag forwarding after ip_frag_reinit()
Date: Thu, 19 Nov 2026 09:40:53 +0100
Organization: Usenet Network
Message-ID: <CAL4Wiioj+Lg8=PyAqLVRLG+uhewDWjaDbk1F=a3woEB+BETkmw@mail.gmail.com>
References: <20261119061751.222641-1-jiayuan.chen@linux.dev>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
	logging-data="2830860"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:3NJmsOw/FovoGfoc1y+yo0NlWxM= sha256:KvggUU3tc1oACIxZjz+tmQ/EzV48SCW/fJbd9MqmS7s=
	sha1:CMo6HQ9QdO0QQ4l/042l0ne+eKA= sha256:GLLZcw8mwNsow0nS9lH7RxYh2ToPaAH8UPgk/9sX79g=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 616BE115568; Thu, 19 Nov 2026 11:43:05 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.401
X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 87NwxAyMq-To;
	Thu, 19 Nov 2026 11:43:02 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-366856-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 522AD115565; Thu, 19 Nov 2026 11:42:52 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 5C6D6327828; Thu, 19 Nov 2026 08:42:33 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1795077666;
	b=HHP4cZV1RdRpsi1GtZiG1eq+mYyXsPQYswVmRL2pRryJX/EQ197W4njunR9gWJUTgzG9
	 9ZFBVpU753f36gO+OE7d4TnrF4bRWTDvmP+J4f8pDASH9Gx/Lalhr+G1rNDGv0y0xA8UX
	 0ZnJLdBeNpLy+hH1Y07N8lOOBsUflzYJL7dz42pdsa90Ion2SzLEcIC5ZLfOQpUi9S6z4
	 tIgQotXVOP+jqqexk3RhKWy6G37BcdQNOKhTqk6yeSkNxHBRrAOgtsc+wZFf+mem0Mxul
	 KAistsdlH+fISkzknFajcqARGmizk1oVQNTfq2fqaBY+xmKlGEka4/pDVzt9S/dyYXg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795077666;
	h=X-Original-To:Received:Received:DKIM-Signature:Received:
	 X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:X-Mailing-List:
	 List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe:
	 List-Owner:Precedence:MIME-Version:References:In-Reply-To:From:Date:
	 X-Gmail-Original-Message-ID:X-Gm-Features:Message-ID:Subject:To:Cc:
	 Content-Type:Content-Transfer-Encoding;
	bh=MSIaEuELRiH+S3myamjUIMtorBRRO9sM9NWx4rnIGEo=;
	b=C7ZNm1RdNbsYKyTniDM5BQfJgJAWxvvvklmNrjj26Vasli5rCC2Ti8GGmrHvg0VA1ghA
	 ZvGI0Pluf7K41TK22DOr8qv/jCaLF08yQ2mGuOZFn1H+eGJ+SVgqg59A7oImiOpGaEqU4
	 QHKPzKvZL9i8092luZrArO69AeMBQPXo//tN3ubzCjBMyBV8hH3AohP38+n29phpAJsou
	 I257R6bzvp2iKgT1bvh1tX2qiH0uiBtQFQ//QxPoQ3/NZSL11hqMy6mqGpSGoY/hSqbr0
	 fLDR4YcATvaSmKjlWgBr7Gqfni4FyRqy1K+lZ1xWhQ7tXS8R6W7A4OY4RPozevO8oCA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Q4Wh0fuh;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id A98B6606AEC8;
	Thu, 19 Nov 2026 08:41:06 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Q4Wh0fuh
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795077665;
	b=Kwpq0SCW8u1CL1cHCUrpBhwCtKXCe8DGJyLR3vYOVr4PPeYHMBzwDbLduiTA+00et3bq
	 3GJY1alq8m2xeHn0VUFlXC2MNumgR1h9G2iY3HEajLcX6STGzWLm/QCn2FVYIYQTmzIsg
	 eRgmL1cuYx2Mk+lX56kcHNMCEM/C55PeehR7YsULolKyqScwnYvLaufCKdR6/B9aWDBu1
	 ZGtD+PBr8UcFFhu4x2f4QL+HIOOeDP2ax+08F8ObTKUmnRqz4f2Bnte8ZzehLCTG9BIQH
	 FQ7XFu6WtsS9pm7LE2aaxQ+Jg+twOFcae4KGP0nL2itq35xIZFrRSs1fKHHV54qdABg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795077665;
	h=Received:DKIM-Signature:Received:X-Forwarded-Encrypted:
	 X-Gm-Message-State:X-Received:MIME-Version:References:In-Reply-To:
	 From:Date:X-Gmail-Original-Message-ID:X-Gm-Features:Message-ID:
	 Subject:To:Cc:Content-Type:Content-Transfer-Encoding;
	bh=MSIaEuELRiH+S3myamjUIMtorBRRO9sM9NWx4rnIGEo=;
	b=cn4hxl3f0q2t+ceoxmR+tU7OcWHyuHvdXrQ7xPi94lxADQBd0ugj7/451Inq3MLkdH32
	 zuM5VzHgVzSK5z0RZ9o9W7GpMJ+8m/jV7R7z4UkSo0tbGfmI6uqmQTrNop/L3rzTbWATJ
	 6bjwqkDShtWpc1vdQwurs+kF6X1g5W8WEGk3vw595mZkqAxC6QDwMSUykmcKnBC5UFvKt
	 tyX2orbtVS9Ku5RcaLuhk2hKGvP1RooGFrhzG1FVnWf11UgNydj/D7cgiqVdqLUei68Dv
	 RgBQrbc3MJl3xH3/OWJV1igz9n+lmoXoOGJRiws58KunaJIQyTwNKq6s/+4HPHTV/Mw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Q4Wh0fuh;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id C88ED606A33D
	for <netdev@vger.kernel.org>; Thu, 19 Nov 2026 08:41:05 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F4091F000CB
	for <netdev@vger.kernel.org>; Thu, 19 Nov 2026 08:41:05 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1795077665;
	bh=MSIaEuELRiH+S3myamjUIMtorBRRO9sM9NWx4rnIGEo=;
	h=References:In-Reply-To:From:Date:Subject:To:Cc;
	b=Q4Wh0fuhuzMIMViH3iDcjIJJwJV04+ugZYadwbnuzOHU49RbjcmwA20EoKFGxmvee
	 tpDPdBda69EPg6XXdDV7eVc3k4R5TL/rAZMmC4SuxoNb9S7EG6f2jzlY1Myk8LWOs4
	 ne55Y/J/N/eeFgUcJ1dnXWDJDj5VoqYyR4+DkT0x+Di75TWYiXJrUsTmGYWKCA7O+e
	 cXLjh4+CYt/WVCu5u4m1C+1/nNfIm2Pb+/JiaJqS7a9W5Dyk3EEVr6YKHXgfa2hSfg
	 /qOMYM8SakCL7nOXkolqhZdggxNjaI5YxU+mBy44D5GC+Xj7gv+Ro1hh49wwmLyBi1
	 ZRsm0DRB94gng==
X-Received: by mail-oo1-f53.google.com with SMTP id 006d021491bc7-705cb6ceebaso1582663eaf.3
        for <netdev@vger.kernel.org>; Thu, 19 Nov 2026 00:41:05 -0800 (PST)
X-Forwarded-Encrypted: i=1; AL+hErEzfdYsIkwScJ9O+Tw+h+5x8O69GbTijBgpw37E+TZ0UJ3TUizfldxDEiL06CqQ9pgA85vnA+Y=@vger.kernel.org
X-Gm-Message-State: APuU4Z+yi9v2giVv0hCAef9mJ7MqmpWLx61J81ighaCt5tY8fqQch/Nn
	WKuZBl3zBnXsbnYKUp0LCx7lW2/uHnDhhpepjB2rYD4Tyfp5qddXBuvcDnCwZzhJ+Kw6seWKQsM
	N8fbSvB/jQ44NTSpAGtoulKH7I/X769g=
X-Received: by 2002:a05:6820:1629:b0:71a:e95a:34dd with SMTP id
 006d021491bc7-71b1861857cmr4385383eaf.78.1795077664746; Thu, 19 Nov 2026
 00:41:04 -0800 (PST)
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <20261119061751.222641-1-jiayuan.chen@linux.dev>
X-Gmail-Original-Message-ID: <CAL4Wiioj+Lg8=PyAqLVRLG+uhewDWjaDbk1F=a3woEB+BETkmw@mail.gmail.com>
X-Gm-Features: AclHuK84Tlqn_D5G8EbCdTmP6ADJEOzBwkNsjW_K1nwUiwhMO48xsSGQSKnvvjg
X-Cc: linux-kernel@vger.kernel.org, pablo@netfilter.org, fw@strlen.de, 
	David Ahern <dsahern@kernel.org>, Ido Schimmel <idosch@nvidia.com>, 
	"David S. Miller" <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, 
	Simon Horman <horms@kernel.org>, Patrick McHardy <kaber@trash.net>, 
	Hannes Frederic Sowa <hannes@stressinduktion.org>, netdev@vger.kernel.org