From nobody Tue Oct 7 03:48:59 2025 Received: from smtpbgsg2.qq.com (smtpbgsg2.qq.com [54.254.200.128]) (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 AD47817A31C for ; Tue, 15 Jul 2025 08:31:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=54.254.200.128 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752568267; cv=none; b=BMVCW17qMdfeG/x7xHuK/iKBRpx1PP0nVg1B0HfEkM7RI/y7XHqE7At0lzvF1qPY95PAaXsgia1ZhDmamO5vfB3KornjlUYcX3Wn/Ro3nZglAn+IkQ6JI+FsbJCAucjKcVy67qQbNM6YTD3DSaq55DOc5Hjl0Pm4epItZJIEt6s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752568267; c=relaxed/simple; bh=7RChoxNZvIGW01objUPMp18lND3qP5swJI6Jly25b3o=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=fzU3ya/hs3inOdzS6nLhRqemSjCZCMXUTCdbn6hEA9BZCSJDt8nb0cnP+JRDcif8hIblxiq5TNgaV5cKwc5/YcMA2iZuJ28x91apQYVTZB3T99gyPmUObwdNuh5MAzU3Nq54FUnIJpafYxr0sIE6tHZLLO3zw3jUrDrLggJWitA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=uniontech.com; spf=pass smtp.mailfrom=uniontech.com; dkim=pass (1024-bit key) header.d=uniontech.com header.i=@uniontech.com header.b=FCoYxd/8; arc=none smtp.client-ip=54.254.200.128 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=uniontech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=uniontech.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=uniontech.com header.i=@uniontech.com header.b="FCoYxd/8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uniontech.com; s=onoh2408; t=1752568202; bh=PtRaWMoDptc1e8ypjYcAlmQHmognEHmmTZFTUdTg2kI=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=FCoYxd/8/eGrGtSqKyHGhTnH82OREw2IdRtXjsRZTEBdlAnJLg4u5IEtwyDP9wt+8 B1ksdg4+wn9LtiQpVeX8vAarIgmOHE73KrB+wB8/Ja5vIGHh7Ujpe/8pgx520AYsL/ nQM4vIhiN4WbTSIKW5Ei1Q3c+sJriiUJLUBVE4OA= X-QQ-mid: zesmtpip2t1752568181tad22719b X-QQ-Originating-IP: 0GVQog9toGo4M4xXdTRBAEj46JRuzpoacgxAEvWriAM= Received: from avenger-e500 ( [localhost]) by bizesmtp.qq.com (ESMTP) with id ; Tue, 15 Jul 2025 16:29:39 +0800 (CST) X-QQ-SSF: 0000000000000000000000000000000 X-QQ-GoodBg: 1 X-BIZMAIL-ID: 6392857298671382999 EX-QQ-RecipientCnt: 13 From: WangYuli To: gregkh@linuxfoundation.org, sashal@kernel.org, stable@vger.kernel.org Cc: davem@davemloft.net, dsahern@kernel.org, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Georg Kohmann , WangYuli Subject: [PATCH 5.4] net: ipv6: Discard next-hop MTU less than minimum link MTU Date: Tue, 15 Jul 2025 16:29:32 +0800 Message-ID: <46839B9D4350724B+20250715082932.430119-1-wangyuli@uniontech.com> X-Mailer: git-send-email 2.50.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 X-QQ-SENDSIZE: 520 Feedback-ID: zesmtpip:uniontech.com:qybglogicsvrgz:qybglogicsvrgz8a-1 X-QQ-XMAILINFO: Of2cEohDBRJB7tm+XdfN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Pxk= X-QQ-RECHKSPAM: 0 Content-Type: text/plain; charset="utf-8" From: Georg Kohmann [ Upstream commit 4a65dff81a04f874fa6915c7f069b4dc2c4010e4 ] When a ICMPV6_PKT_TOOBIG report a next-hop MTU that is less than the IPv6 minimum link MTU, the estimated path MTU is reduced to the minimum link MTU. This behaviour breaks TAHI IPv6 Core Conformance Test v6LC4.1.6: Packet Too Big Less than IPv6 MTU. Referring to RFC 8201 section 4: "If a node receives a Packet Too Big message reporting a next-hop MTU that is less than the IPv6 minimum link MTU, it must discard it. A node must not reduce its estimate of the Path MTU below the IPv6 minimum link MTU on receipt of a Packet Too Big message." Drop the path MTU update if reported MTU is less than the minimum link MTU. Signed-off-by: Georg Kohmann Signed-off-by: Jakub Kicinski Signed-off-by: WangYuli --- net/ipv6/route.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/ipv6/route.c b/net/ipv6/route.c index b321cec71127..93bae134e730 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -2765,7 +2765,8 @@ static void __ip6_rt_update_pmtu(struct dst_entry *ds= t, const struct sock *sk, if (confirm_neigh) dst_confirm_neigh(dst, daddr); =20 - mtu =3D max_t(u32, mtu, IPV6_MIN_MTU); + if (mtu < IPV6_MIN_MTU) + return; if (mtu >=3D dst_mtu(dst)) return; =20 --=20 2.50.0