From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.143.172.20 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796232744; b=RNA0ug9H3TCpJ/C2gIZ2MIfTBpaBEowPoBgrLieq/6Q5Op1jZJmzzLAHjAkIKiXlHkd0 3eiVcX+p3JnwIoDObXIUcAkEZemVVEzm5lvBWN036s7l6vsVMGb+PnsLlTefyDhvAW4Tq 8QIEHccndZZuy/w0px+DGeFuQUkm8TDY+m/JVEoPyawO9lLIWpErc/7VfwKH/ZyDS6uXe vpvOCMg5KAnJsEis9Z8Kn3/+9vEXG5sOTqDDDuSSIe8zvgdVP4StLf0NKfC/NTlivlT6j qUCU/SQOvgUOMhtg3pD8hiub2vW5I4p7KZHjw+42uoN1kQQg1CXIs5aaMis/O0O1IkA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796232744; 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=DmerrrLC0N2PG6/O+dZcITqqYmuMw0y+I03Ph3SvPw4=; b=OGVPneumi7AnIJHVMibk7PYNlRcB1CSbRpWQfuRhdyEjaKQYzOjWiSx3n7SEqndSvK6q JSnVDX9TQzyj9DTATeTV9dB26SnCyUP44OjdMnUezq+m2U/4NJtNo6lgb2SjXkKVmbmKC jtbekG4wDVuqU8wigyD3jvc8i/zZ4hdvU2a1R9z2ByoqJx21Gr1WLzkdg+8ZpOhxDsSjf E0JB+t2Bo0FJpawAZQPLYuORX655JLF6dhWTDDgvIsyIxEAQNjNubFEi7FzPpTKUOcHZI 4tOpotkbeGDFX+xcDUKyw8xvO0PTON8dGxZv7MpyNdGwfEA9ItDIMJSVa1dIVV7me0g== 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=j6e+PM6h; arc=none smtp.remote-ip=95.143.172.20 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 420B5606A683 for ; Wed, 2 Dec 2026 17:32:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 420B5606A683 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lausen.nl Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lausen.nl 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=j6e+PM6h Received: from devico.uberspace.de (devico.uberspace.de [185.26.156.185]) by mailgate01.uberspace.is (Postfix) with ESMTPS id 8711A60E13 for ; Wed, 02 Dec 2026 18:32:14 +0100 (CET) Received: (qmail 20704 invoked by uid 990); 2 Dec 2026 17:32:14 -0000 Authentication-Results: devico.uberspace.de; auth=pass (plain) Received: from unknown (HELO unknown) (::1) by devico.uberspace.de (Haraka/3.1.1) with ESMTPSA; Wed, 02 Dec 2026 18:32:14 +0100 From: Leonard Lausen To: netdev@vger.kernel.org Cc: leonard@lausen.nl, David Ahern , Ido Schimmel , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Willem de Bruijn , Simon Horman , Pablo Neira Ayuso , Florian Westphal , Phil Sutter , Shuah Khan , 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 Message-ID: <20261202173023.17220-3-leonard@lausen.nl> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261202173023.17220-1-leonard@lausen.nl> References: <20261202173023.17220-1-leonard@lausen.nl> X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lausen.nl; s=uberspace; h=from:to:cc:subject:date; bh=x8bm/fPaBX3yCPqU8Bj16u8dF3tAscTDs+7C6bRDjVQ=; b=j6e+PM6huq24471XkgSjsL/WGHNarZvZ0rZCb/nSUqihLwtneTVhAdFn36+B4nzKVgj7v3AV0E wESjQvVRQRvhllB2GU8cViz9gvT1db6aD04ZpoUSNNM/3UF+Atyt2Ywusx7UCqAuHK/C7LUhzsgW nZSaWXbecTG96DE9B6KFJdhiC7iVZTdDIs4FDLe/IICp7VBCNqp25t7DWXjNeGf+70nmSJjGfc2y 1gIZm2my+0cMf5Yz4ALJ4Knfw6JfuQDsFLf3UP4oBvpnrn9olSs8/E2wRZgmh95njx4a7Ykhx0VT MDzIk2VpzLozJz8+fVx7krZIO1f/1RYxdnKXipsiMdgTKplkwt8mPhHuqplBCCDe057YdtFsqfFF CWVO6PyWXU0oszqtcR2d9YBWBI0EGkb4bQ/hX2Wo32l81k9PY3tz4/5Opug7K5nCqlmLTE14/1Zk CRLIyrcs+F0ZZeLJK7IStyaxLAFPp18QSTSHUK4YHJDe+PJn2/Cw7GnFK4JQSwAfssrfapnjoicW SvjOFAwVgu+W0WEoC4rLfszXxyMJRvIh1Lw24a/f8k2ZTDl1QAZF0ZRGK9nBwiYVaX959hOj8UO6 TxcjQGtSFsEBY6nj0if+UGsTS5obrWPi6vERxL5QIrABqv3XU/WpqfvMzaXfisXHAv75YMlo2EC/ A= 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 --- 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