From: Leonard Lausen <leonard@lausen.nl>
To: netdev@vger.kernel.org
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>,
Willem de Bruijn <willemb@google.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>,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
linux-kselftest@vger.kernel.org
Subject: [PATCH net-next 2/2] selftests: netfilter: cover IPv6 prefix suppression with a PMTU exception
Date: Wed, 2 Dec 2026 17:30:22 +0000 [thread overview]
Message-ID: <20261202173023.17220-3-leonard@lausen.nl> (raw)
In-Reply-To: <20261202173023.17220-1-leonard@lausen.nl>
Create a PMTU exception for the first table's default route using the
existing peer namespace and an MTU-1280 route. Temporarily bypass
suppression while sending an oversized echo request, and require an
ordinary route lookup to show the resulting MTU before removing the
bypass rule.
Reuse test_fib_suppress() to check that both nftables and an ordinary
route lookup then select the later table. On the pre-fix kernel, this
new case fails while the other six suppression checks pass.
Signed-off-by: Leonard Lausen <leonard@lausen.nl>
---
This adds the PMTU case deferred from the earlier series, using the
suppression helper and six checks already merged in a0bf14e17fb2.
.../selftests/net/netfilter/nft_fib.sh | 21 ++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/netfilter/nft_fib.sh b/tools/testing/selftests/net/netfilter/nft_fib.sh
index 25e13197f057..175bdfa825c9 100755
--- a/tools/testing/selftests/net/netfilter/nft_fib.sh
+++ b/tools/testing/selftests/net/netfilter/nft_fib.sh
@@ -893,7 +893,8 @@ ip netns exec "$nsrouter" nft delete table ip6 filter
# The router's logging RPF rules have already been removed here.
if ip -net "$nsrouter" -6 rule add pref 100 to dead:1::99 table 128 \
suppress_prefixlength 0; then
- ip -net "$nsrouter" -6 route add table 128 default dev veth1 || exit 1
+ ip -net "$nsrouter" -6 route add table 128 default \
+ via dead:2::99 dev veth1 || exit 1
ip -net "$nsrouter" -6 route add table 129 dead:1::/64 \
dev veth0 || exit 1
ip -net "$nsrouter" -6 rule add pref 101 to dead:1::99 \
@@ -907,6 +908,24 @@ if ip -net "$nsrouter" -6 rule add pref 100 to dead:1::99 table 128 \
ip -net "$nsrouter" -6 route del table 128 dead:1::/64 \
dev veth1 || exit 1
+ # Seed a PMTU exception while bypassing suppression of its parent route.
+ ip -net "$ns2" -6 route add dead:1::99/128 via dead:2::1 \
+ dev eth0 mtu 1280 || exit 1
+ ip netns exec "$ns2" sysctl -qw net.ipv6.conf.all.forwarding=1
+ ip -net "$nsrouter" -6 rule add pref 99 to dead:1::99 \
+ table 128 || exit 1
+ ip netns exec "$nsrouter" ping -6 -I dead:2::1 -M do -s 1400 -c 1 -W 1 \
+ dead:1::99 > /dev/null 2>&1
+ if ! ip -net "$nsrouter" -6 route get dead:1::99 from dead:1::1 |
+ grep -q 'mtu 1280'; then
+ echo "FAIL: could not create PMTU exception"
+ exit 1
+ fi
+ ip -net "$nsrouter" -6 rule del pref 99
+ test_fib_suppress "suppress cached default route" veth0 || ret=1
+ ip -net "$ns2" -6 route del dead:1::99/128
+ ip netns exec "$ns2" sysctl -qw net.ipv6.conf.all.forwarding=0
+
for type in blackhole unreachable prohibit; do
ip -net "$nsrouter" -6 route replace "$type" default \
table 128 || exit 1
--
2.55.0
prev parent reply other threads:[~2026-12-02 17:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 17:30 [PATCH net-next 0/2] ipv6: Use the FIB prefix length to suppress cached routes Leonard Lausen
2026-12-02 17:30 ` [PATCH net-next 1/2] ipv6: Use the FIB prefix length when suppressing " Leonard Lausen
2026-12-03 9:02 ` Ido Schimmel
2026-12-02 17:30 ` Leonard Lausen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261202173023.17220-3-leonard@lausen.nl \
--to=leonard@lausen.nl \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@kernel.org \
--cc=fw@strlen.de \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
--cc=phil@nwl.cc \
--cc=shuah@kernel.org \
--cc=willemb@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox