Article View: linux.kernel.netdev
Article #17283[PATCH net v3 1/3] ipv6: Use the FIB prefix length when suppressing cached routes
From: Leonard Lausen
Date: Mon, 16 Nov 2026 15:01
Date: Mon, 16 Nov 2026 15:01
59 lines
11687 bytes
11687 bytes
fib6_rule_suppress() compares suppress_prefixlen with rt6i_dst.plen.
PMTU and redirect exceptions have a /128 destination prefix even when
their parent FIB route is a default route. Consequently, a cached
exception bypasses suppress_prefixlength 0 and stops the rule lookup
instead of continuing to a later table.
Use the parent FIB entry's destination prefix length when available.
The rule lookup already holds the RCU read lock needed to read rt->from.
Retain the existing prefix check if the destination has lost its parent.
Interface-group checks and destination reference handling are unchanged.
Reproduced with a PMTU exception created by an ICMPv6 Packet Too Big,
without kernel instrumentation. Verified with the namespace reproducer
and nft_fib.sh on the rebuilt v7.4-rc2-based kernel.
Fixes: 7764a45a8f1f ("fib_rules: add .suppress operation")
Signed-off-by: Leonard Lausen <leonard@lausen.nl>
---
v3:
- New separate fix for the cached-exception issue identified in review.
- Reproduced with ICMPv6 Packet Too Big and verified on the rebuilt
kernel with the reproducer and all seven nft_fib.sh cases.
v2: https://lore.kernel.org/netdev/20261115114434.10343-2-leonard@lausen.nl/
net/ipv6/fib6_rules.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c
index 0ffd7b47a046..5e2a79a81bf3 100644
--- a/net/ipv6/fib6_rules.c
+++ b/net/ipv6/fib6_rules.c
@@ -285,6 +285,8 @@ INDIRECT_CALLABLE_SCOPE bool fib6_rule_suppress(struct fib_rule *rule,
struct fib6_result *res = arg->result;
struct rt6_info *rt = res->rt6;
struct net_device *dev = NULL;
+ struct fib6_info *from;
+ int plen;
if (!rt)
return false;
@@ -292,10 +294,13 @@ INDIRECT_CALLABLE_SCOPE bool fib6_rule_suppress(struct fib_rule *rule,
if (rt->rt6i_idev)
dev = rt->rt6i_idev->dev;
+ from = rcu_dereference(rt->from);
+ plen = from ? from->fib6_dst.plen : rt->rt6i_dst.plen;
+
/* do not accept result if the route does
* not meet the required prefix length
*/
- if (rt->rt6i_dst.plen <= rule->suppress_prefixlen)
+ if (plen <= rule->suppress_prefixlen)
goto suppress_route;
/* do not accept result if the route uses a device
--
2.55.0
Technical Details
Message-ID:
<20261116150132.9594-2-leonard@lausen.nl>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-364488-linux-kernel-netdev=dewy.ruReferences:
<20261116150132.9594-1-leonard@lausen.nl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-364488-linux-kernel-netdev=dewy.ru From: leonard@lausen.nl (Leonard Lausen) Newsgroups: linux.kernel.netdev Subject: [PATCH net v3 1/3] ipv6: Use the FIB prefix length when suppressing cached routes Date: Mon, 16 Nov 2026 15:01:28 +0000 Organization: Usenet Network Message-ID: <20261116150132.9594-2-leonard@lausen.nl> References: <20261116150132.9594-1-leonard@lausen.nl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2092500"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:+bf8iEF8OFqU341F17GaQLutDaI= sha256:i0UWg9FMw5PmaVpQS7o1bGxvDO/2pFQ0rL5FCm+OKII= sha1:6/PpB8q4Ws8AHmGin4kCEc/gGFg= sha256:wwvu9LnGM/gSQQZ+6lev5GqdzBTBegmseN84Px0i5oc= 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 BDA7E114CA1; Mon, 16 Nov 2026 18:02:16 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.05 X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (4096-bit key) header.d=lausen.nl 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 3U2uLLk5TjDA; Mon, 16 Nov 2026 18:02:13 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-364488-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=lausen.nl X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id A560F114C9E; Mon, 16 Nov 2026 18:02:04 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sin.lore.kernel.org (Postfix) with ESMTP id 4B66A27A6A; Mon, 16 Nov 2026 15:01:56 +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=1794841312; b=j8vtXPQHd9f1BYNO4YQLqxO11AbRcYpZUxiycx3dV7snV7nNIgIRItQxAgFjKsJ5l0ac QgwCMQBpo+K8nhqWsmnqt/8PAx/cklb0PbcCfNR2e/9JTp3DTeYEHXS9qq8vOq+R0Y9M2 sXueRgZvJxMmacO/vjyeOu9Xj7QlMASa4PwoYe3VLCzvvyATwid8wpDE3S4lnMJAMJGNG KrN+BtvdklJl7b64iHs8p5lDZtSwL1P94wdr8rF7l9g+6UlsmRPv8AaIIlYgHa1Yn/jkJ U72Grs9U/ISvSioICDShy4SgMFzbFSmH2YODRflDIopyR9yLrgxY9b7vSd9Gkw6SdCA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794841312; h=X-Original-To:Received:DMARC-Filter:Received:Received:Received:From: To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Transfer-Encoding:X-Rspamd-Bar:X-Rspamd-Report:X-Rspamd-Score: DKIM-Signature; bh=nWU2LRdDXJ4j/FgpkY7ig95ec8lJA/+RUw4fK2JInKI=; b=UG1tOwWgc0UcFtCJCzJdIDRnbf/e35jq+swNkVutGPgr/ACO7gwoBemCVpfEje2GhJnR JSM5K+CfKr73dWAVKfkPn/IGTjo+rzmNavTDWd0zRoONACAw7g7gppO9FWnfmPM3OsXTO 79nARNo6WkavPA0F86bKza7cFMhCpGHS2S5QUKq9JVE3VW6dk+F7ZmIDlvBeU2Y33Aat7 ynru/Fmy66/jVYnZ0qVsHueDlF+emKYobSYMu+l4IsyZRCs1aoen/itzyTMpr0HTGAYiC rUKenP9NpEddjKxoFVGJKokwOuta4u8xQ2IwmKqmkJRcQFrCwT+PdfotochDw56xXGg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=lausen.nl header.i=@lausen.nl header.a=rsa-sha256 header.s=uberspace header.b=gJqaubhk; dmarc=pass header.from=lausen.nl; spf=pass smtp.mailfrom=lausen.nl; 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 411AF606A880; Mon, 16 Nov 2026 15:01:52 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (4096-bit key) header.d=lausen.nl header.i=@lausen.nl header.a=rsa-sha256 header.s=uberspace header.b=gJqaubhk X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.143.172.20 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794841311; b=Mbm3Ldqc/BUwmMeQq1C3UYkSgrBCZaTKBPPHi8sW1so9MEA+2oWZCUtdQSy3FJB2qb69 WHxJFHVnwUhyVKNDlhFQ8xUTGiscN9ixT1wq66QdfXAZavmdud9qiheMKnn/K7a3hAxTL 6VtUW+w/aFyAjYs0oRX0Fko3nG0i8NhJ156nCPkG9SJ0CqhuQIq9p1k6fkf1B1fRwbiiG gJrw9KXskMGmRA1n9lz/oFrFuorEDhoESDzBpR7qJ8cQ3SB5P1sCJFDDAkc0wKSbmbnIg K/2YFjSFGJyTw2eijXd83K4cMfDQGnrsLKfTND7QBAL9ehDCARPxtyIpPX2koK83SuA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794841311; h=DMARC-Filter:Received:Received:Received:From:To:Cc:Subject:Date: Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-Rspamd-Bar:X-Rspamd-Report:X-Rspamd-Score: DKIM-Signature; bh=nWU2LRdDXJ4j/FgpkY7ig95ec8lJA/+RUw4fK2JInKI=; b=arE2LQSOfETxih1WAakQj1dpOnwDqLP5+LZRcKgtztoHWBNj1Qx/J2dsd9WurhE4upcW qtgyjGoay70T/ohb2e6nSkzQ1KiL4K3e8CxJaC/DMo+KJQtjCwR5h+Uk48o3F66wycS4q x0Ca0WpyvbmbCspLk4LLrbjy9yhAtypS2N7LcRINwnEgarR7pEHNXdPUBkCHj534stt+l a+083yoxM9AeAQOBE+sJubnuxfPp/Br9Xr7r++NT9/PMSUozRjgUfbm/pd5EyIPlpzlOY aOUxLtd1vu2FqYzl4ipm6KpJ/TGUZntouC6evM86/VHR7XuXxHMQjZOafPNfGoyu47w== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=lausen.nl; spf=pass smtp.mailfrom=lausen.nl; dkim=pass header.d=lausen.nl header.i=@lausen.nl header.a=rsa-sha256 header.s=uberspace header.b=gJqaubhk; arc=none smtp.remote-ip=95.143.172.20 X-Received: from mailgate01.uberspace.is (mailgate01.uberspace.is [95.143.172.20]) (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 7B9FA606A32C for <netdev@vger.kernel.org>; Mon, 16 Nov 2026 15:01:50 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7B9FA606A32C X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lausen.nl X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lausen.nl X-Received: from devico.uberspace.de (devico.uberspace.de [185.26.156.185]) by mailgate01.uberspace.is (Postfix) with ESMTPS id 7659261116 for <netdev@vger.kernel.org>; Mon, 16 Nov 2026 16:01:43 +0100 (CET) X-Received: (qmail 22837 invoked by uid 990); 16 Nov 2026 15:01:43 -0000 X-Authentication-Results: devico.uberspace.de; auth=pass (plain) X-Received: from unknown (HELO unknown) (::1) by devico.uberspace.de (Haraka/3.1.1) with ESMTPSA; Mon, 16 Nov 2026 16:01:43 +0100 X-Cc: leonard@lausen.nl, David Ahern <dsahern@kernel.org>, Ido Schimmel <idosch@nvidia.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>, Pablo Neira Ayuso <pablo@netfilter.org>, Florian Westphal <fw@strlen.de>, Phil Sutter <phil@nwl.cc>, Shuah Khan <shuah@kernel.org>, Daniel Borkmann <daniel@iogearbox.net>, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: git-send-email 2.55.0 X-In-Reply-To: <20261116150132.9594-1-leonard@lausen.nl> 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-Rspamd-Bar: ----- X-Rspamd-Report: REPLY(-4) BAYES_HAM(-2.999999) MID_CONTAINS_FROM(1) MIME_GOOD(-0.1) R_MISSING_CHARSET(0.5) X-Rspamd-Score: -5.599999 X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lausen.nl; s=uberspace; h=from:to:cc:subject:date; bh=CmlnvftUOEkMRs1fyX9q9MoUVh+kXC35NtIDAenZtp8=; b=gJqaubhkrs1lbdL52HG6W8XLf2BZH79RIvzubuE1pqscgpY+hX2gFtRt8hr8LfFx2IqxSgUdIo rP00IO+kwdrDlvMPhcOM0vES2qkP/f2EfvPP23iTFC0oL31WrhAasjYMiWcWz1jH7LbofyYBFic5 emheHuksHyrtug3yrE2sFwSTvlQnueHJgx89dWOKHyXZwTb30NR0AeRAfO7ouqRC2Pw+M1OLE00q 4Qv1SJ74pjEt/sbRqh+fiM+cRBLf1ptjvB3DurlYijAmDn64jh7NW+5gqjtuG1ZpqetpXAfe4mDk 7pAGIr38hOCh/8KqZPc4lOM9/NPI8KWnQf5ncU+nK5q//5PWghhw4anRqGy9Hd14Gm/z6zCkbG+V oVZG4IJ7ggtvakGr1f85OlqehU6bYWT9wgKxT/t93iiS97kgj8oTV12Hx1Qs0Al+lwMZCv9062xN /xLUn3+iKhiAD6x4z0nrHMza97Uj0lO2DaO4OCnHkAALiwHijVfpR6OJ7jFlHO7myybb/BW37m2E k70kb5XBT4M4lJ3JH1VB8W1fKnbLManfUutVw1f5aqPnufxmUBlKaxYbf2gyTjfAGTBRLOVb+agZ 35zM7GbWEYsN05/ap2FMbp9Qm1VHcWDjicRWADsXYVsDW3cRInL+HS0a4n9pq9CXcs9WT2cH3Liu k=