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

From
Leonard Lausen <hidden>
Date
2026-11-16 15:01:49
Also in
linux-kselftest, lkml, netfilter-devel
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/ (local)

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
Thread (4 messages) 4 messages, 1 author, last reply 6h ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help