🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #17282

[PATCH net v3 0/3] ipv6: Honor prefix suppression for FIB lookups and cached routes

#17282
From: Leonard Lausen
Date: Mon, 16 Nov 2026 15:01
61 lines
12431 bytes
This revision also takes a stab at addressing the cached-exception disagreement
identified in review. The fix remains small and is a separate patch so it can
be picked up or discarded independently of the fib6_lookup() change.

Patch 1 uses the parent FIB entry's prefix length for dst-based
suppression. PMTU and redirect exceptions have /128 prefixes even when
their parent is a default route. Reading rt->from under the existing RCU
read lock fixes that comparison; a detached destination retains its old
behavior. Interface-group checks and reference handling are unchanged.

Patch 2 adds the fib6_lookup() prefix-suppression check from v2, with the
reviewer's requested message, Fixes tag, original initializer and comment.
It preserves reject results, including blackhole nexthop objects. Support
for interface-group suppression in fib6_lookup() remains deferred.

Patch 3 reuses nft_fib.sh's fixture. Besides the six existing suppression
checks it seeds a real PMTU exception via ICMPv6 Packet Too Big and checks
that the parent default route is suppressed. The extra case uses the
existing peer namespace and adds no new devices or dependencies.

Changes since v2:
- Add the separate cached-exception fix and PMTU regression case.
- Adopt the maintainer's terminology, message, Fixes tag and comment.
- Remove Assisted-by and retain the original rt initializer.
- Run the checks after the default-table tests, preserving coverage before
  custom IPv6 rules are configured and avoiding logging RPF during probes.
- Label ruleset-load failures, skip unsupported optional features, and
  check ordinary rejection errors using the C locale.

V2: https://lore.kernel.org/netdev/20261115114434.10343-2-leonard@lausen.nl/

Verified on the rebuilt v7.4-rc2-based kernel: all seven added checks
pass and the complete nft_fib.sh run exits 0. A run with an eight-second
delay also exits 0. The PMTU reproducer creates a real mtu-1280 exception,
then confirms that both ordinary and nftables lookups continue to the
later table when the parent default is suppressed. Twelve reject-route
probes, including blackhole nexthop objects, remain terminal.

The source compiles without warnings and passes focused callback tests.
Automated kernel-log checks were unavailable in the namespace test
session. Target-net runtime and full W=1 allyesconfig/allmodconfig builds
remain unchecked. The series is based on v7.4-rc2 (7475ea8b5861).

OpenAI Codex assisted with investigation, reproduction, implementation,
tests and descriptions. The prompts asked it to investigate the VPN
failure, simplify the series and address review feedback.

Leonard Lausen (3):
  ipv6: Use the FIB prefix length when suppressing cached routes
  ipv6: Honor suppress_prefixlength in fib6_lookup()
  selftests: netfilter: cover IPv6 FIB prefix suppression

 net/ipv6/fib6_rules.c                            |  13 ++-
 tools/testing/selftests/net/netfilter/nft_fib.sh | 109 +++++++++++++++++++++++
 2 files changed, 121 insertions(+), 1 deletion(-)


base-commit: 7475ea8b58616b33c04afb976cf0fbaad9dd63fb
-- 
2.55.0
Technical Details
Message-ID: <20261116150132.9594-1-leonard@lausen.nl>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-364489-linux-kernel-netdev=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-364489-linux-kernel-netdev=dewy.ru
From: leonard@lausen.nl (Leonard Lausen)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net v3 0/3] ipv6: Honor prefix suppression for FIB lookups and cached routes
Date: Mon, 16 Nov 2026 15:01:27 +0000
Organization: Usenet Network
Message-ID: <20261116150132.9594-1-leonard@lausen.nl>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2092460"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:c3/Om4FM+swZ9gReL7Vcqc7niRk= sha256:Api0te0q+Hn531ZoXAIBsdUEJCW+Tv+UvXbDfiUn23Q=
	sha1:dk1t7ICxQiam2kHgYDK3Ff+xK3M= sha256:+JW70ZJSP4t2XhxJVymfizh3dRZCoon38F1uOCt+yrA=
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 04407114CA1; 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 ZAumVAlZV5_d;
	Mon, 16 Nov 2026 18:02:12 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-364489-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 5EEA8114C81; Mon, 16 Nov 2026 18:02:02 +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 93F5327CBD; 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=ae8Qx0Rbk96WFz5ZtPVEQrCrWqqUIlx5FCb4R8zcsIxovSfMRqNulSmcxN8Ai1Xe0ozV
	 7Dr3tY0wwczbyble+NcY/IIqRXzu9KWD3nUqYS5sMJgu8u6MIbUF2r5e3Q42SlBziYfGl
	 1RprCLqJ/N+nFju9kkKxkY/uiBlXU6a1Y3soTKrrlJaO3fYVZ3wpTSKYaZoc0CtY5ERL9
	 PzfEvBK0kk655ikLcVWHF3BWNCApER3R2evKDTdWozFpyIafeiSPVq4N1M1z2aIEq81hC
	 dQYeRamMOAWarZxwWYFUfDfES86S7Z5woM9Zm79eTQoO3D36ie5H7FCW+xKFZnTj4Ng==
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: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=t4gHpP4H2Ksz/Yzkd0M1q7ZQ0MFcNwP5TlblCualRd0=;
	b=1qRfee9I7BW+slwprd0sKEQXjOCUDOGJlNL5gOUMJCvX46zZOxN+rfpPqgBtYpEGToHF
	 HJ+//EknOJifxjX4jq2Pyo8dfZIZg46t4cARFwYEUFIvppaQ078ZB2nENVcj6gPwORiAN
	 tgh9c1x3LBuoeSmybiHqLVOcLJAZw+1ihS/UPr/X095ufe40o+FL+6j3SsOvZxkHj1X2x
	 6PusQ0XCDsS+N6SIVfDogz9x/G/pQC8YhMtGhGNjWdz5HjZbq5b/zzo4IhbDUWlYwT6Be
	 TiK6yYLEaQwisky0EMf1Dbbx6xboBr95sJpEQdWb/osit2Tc+AvkfUOjANFBl13QQkQ==
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=UQhB2oO2;
	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 53B2E606A31C;
	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=UQhB2oO2
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=FjGRIsqGA13Tru49pOMI1v52iQf4mNuUSrMg0hC713dc86Xmyh66ZpfBxV05ZJJmy0N1
	 Lz1Se8zBvTo8NSlp7UqiO5C9hY8pu76BVJ3e/UQDrYcQiUABWOrUnZ/IDjLB8Y9kuu/0w
	 OTWgP80MmX6llgxQDvRqH8s4dKW7jneGOOvYDEkt46xMgTO/DC95cwcuSvw3VdbvSbdnG
	 8uUlYKfp8v0IHlmDqX4Lx1MaWXHTW4HQjNdIMKQBeVljw7uZXlSPbZp0pqTUksBKADMIJ
	 idb1oOT/lw347xkAmDIK0EFBtB9OMDUjRs1nYNbn/pmGxMGsyR2n3H/8dPtKbfyDorg==
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:MIME-Version:Content-Transfer-Encoding:
	 X-Rspamd-Bar:X-Rspamd-Report:X-Rspamd-Score:DKIM-Signature;
	bh=t4gHpP4H2Ksz/Yzkd0M1q7ZQ0MFcNwP5TlblCualRd0=;
	b=wFE432b6icZ/cq2ykrC6PgRcDAvtldqs2xnstns+SQXDbiq2ifetY7qrzGAusavxffv/
	 m68ZX5lch08qiaavdnbz/pmZCUPa1h8QsGfeGvAGga91A6wvrzXyWhyydAk/5XIQxfjCw
	 BV9mO/2CO7sjtNp5gj4NQ8cqwVqxidTJ3lPU4a1LFRwKx3v7pdJpG56/dEyPS+NaiR+ff
	 jarByZq1723fdEeiihEnzP/A1S3sO+Rnwv2u1Q0DuOzwaktOefHpkgMTsaGImZWqAkjkn
	 R5afjgxFNdymdl5BbQ/ao0S+64hAwJjhVClVRCLM+9Z16YSJB9txZV7D+ISd/e4Wb1Q==
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=UQhB2oO2;
	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) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id DEBBB606A323
	for <netdev@vger.kernel.org>; Mon, 16 Nov 2026 15:01:49 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org DEBBB606A323
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 C172860BF8
	for <netdev@vger.kernel.org>; Mon, 16 Nov 2026 16:01:41 +0100 (CET)
X-Received: (qmail 22766 invoked by uid 990); 16 Nov 2026 15:01:41 -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:41 +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-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: MID_CONTAINS_FROM(1) BAYES_HAM(-2.990565) MIME_GOOD(-0.1) R_MISSING_CHARSET(0.5)
X-Rspamd-Score: -1.590565
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
	d=lausen.nl; s=uberspace;
	h=from:to:cc:subject:date;
	bh=9VUargRA+llLPhlaHqp7nVxV42OmmixbozWbpTCEDjE=;
	b=UQhB2oO26xg0BF8W7MP4JQ3dnYrFDI793YEdxhmqtTcNBeoiAZuW2lqpsAl1i/6aPQG+OUCsrj
	E6I0GhlqKfOE7xcTYWQC2aHenXAAm/GJRqHGytLMKP70SRxzguxjYVT1YDsyqr00qG2tL20LXoV8
	4YsyKLv3D+WwUGvkX/YEqQv4AzxthllTeQfJDQc7OtLVZwYrJj5i3UdWqitMC7BFOTB5YeQ94yPH
	vjV3AzfwlzGCiQs95PRMA8LmaRIEjTnWNFDzUSLw0aAqNLwYS/+F3R8zHC/IVqvSit2SfXM5cBcC
	A3264SxA8848c6vPI8ZsnkrzjyFJ6bawVoDmzys7RWTfLxsW0HMkcKKF7/RHa8+fgaAv9ERyAGOP
	Dta2GndD9ea6yJohHoP3m5Q3HJTJ/0ZsyjjdV02trHMnjYCXAlSZ1pd9BUdP45iz4WOTKHHP3xZC
	gwK1gLvuww8LNTD4Xhg8jvDyVoqx5Hhj/nur7bmd/vTfudMoIebRYHFUxnpdj0acjb3ytM6SMcoS
	oRMb6uPSez+H3fd+M8762myEaHm1wqpJeQUQirpNROyslxO/r1wYokCYh6pxF/2xDgIW+rucdBT1
	0Qb3PIJCcp0bMtxvSHfJkOiMTgJNcqLyFgG6946aNHtUL8AqF9u0R85lVRQEXuGxv8+E5kb+TnOP
	c=