mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@nvidia.com>
To: liamsmith827 <liamsmith827@grapheneos.org>
Cc: netdev@vger.kernel.org, David Ahern <dsahern@kernel.org>,
	"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>, Shuah Khan <shuah@kernel.org>,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	Liam Smith <liamsmith827@proton.me>
Subject: Re: [PATCH net-next v4 3/4] selftests: net: test restricted on-link fallback
Date: Mon, 16 Nov 2026 10:59:45 +0200	[thread overview]
Message-ID: <20261116085945.GA105971@shredder> (raw)
In-Reply-To: <20261115215640.18728-4-liamsmith827@grapheneos.org>

On Sun, Nov 15, 2026 at 09:56:39PM +0000, liamsmith827 wrote:
> From: Liam Smith <liamsmith827@proton.me>
> 
> Following the previous patch, the on-link fallback is no longer taken
> when the FIB lookup hits an unreachable, blackhole or prohibit route/
> rule. Adjust the IPv4 tests accordingly:
> 
> 1. ipv4_ping_novrf(): Pinging a loopback address while bound to a
> device now fails with an error instead of timing out, since the lookup
> hits the unreachable default route. Adjust the expected return code.
> 
> 2. ipv4_ping_novrf(): Add a variant of the above without the
> unreachable default route, to make sure that the fallback is still
> taken upon a route miss.
> 
> 3. ipv4_ping_novrf(): Add a test that demonstrates ping fails as
> expected with an unreachable rule. This ensures FIB_LOOKUP_REPORT_MISS
> does not break this behavior.
> 
> 4. ipv4_ping_novrf(): Enable the device bind test cases that were
> commented out because of the fallback (prohibit rule, unreachable route
> and unreachable default route).
> 
> 5. ipv4_udp_novrf(): Connecting to a loopback address while bound to a
> device now fails with an error instead of timing out. Adjust the
> expected return code.
> 
> With the exception of the route miss and unreachable ping test cases,
> which are specific to IPv4, the IPv4 test cases are now aligned with
> their IPv6 counterparts.
> 
> Signed-off-by: Liam Smith <liamsmith827@proton.me>

# ./fcnal-test.sh -t ipv4_ping
[...]
Tests passed: 122
Tests failed:   3

Don't submit tests without running them.

Needs:

diff --git a/tools/testing/selftests/net/fcnal-test.sh b/tools/testing/selftests/net/fcnal-test.sh
index 9722d7dcad08..7d51fdcc8fda 100755
--- a/tools/testing/selftests/net/fcnal-test.sh
+++ b/tools/testing/selftests/net/fcnal-test.sh
@@ -658,7 +658,8 @@ ipv4_ping_novrf()
 
 	log_start
 	setup_cmd ip rule add pref 49 to ${NSB_LO_IP} unreachable
-	log_test_addr ${a} $? 2 "ping out, blocked by unreachable rule"
+	run_cmd ping -c1 -w1 -I ${NSA_DEV} ${a}
+	log_test_addr ${a} $? 2 "ping out, device bind, blocked by unreachable rule"
 	setup_cmd ip rule del pref 49 to ${NSB_LO_IP} unreachable
 
 	log_start


  reply	other threads:[~2026-11-16  8:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-15 21:56 [PATCH net-next v4 0/4] ipv4: restrict on-link fallback to lookup misses liamsmith827
2026-11-15 21:56 ` [PATCH net-next v4 1/4] ipv4: add FIB_LOOKUP_REPORT_MISS liamsmith827
2026-11-15 21:56 ` [PATCH net-next v4 2/4] ipv4: restrict on-link fallback to lookup misses liamsmith827
2026-11-15 21:56 ` [PATCH net-next v4 3/4] selftests: net: test restricted on-link fallback liamsmith827
2026-11-16  8:59   ` Ido Schimmel [this message]
2026-11-15 21:56 ` [PATCH net-next v4 4/4] ipv4: replace obsolete routing comment liamsmith827

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=20261116085945.GA105971@shredder \
    --to=idosch@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=liamsmith827@grapheneos.org \
    --cc=liamsmith827@proton.me \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    /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

all inboxes | Powered by JetHome®