From: Yuen Su <zypulsecore@gmail.com>
To: netdev@vger.kernel.org
Cc: David Ahern <dsahern@kernel.org>,
Ido Schimmel <idosch@nvidia.com>,
Stephen Hemminger <stephen@networkplumber.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,
linux-api@vger.kernel.org
Subject: [PATCH net 2/2] selftests: net: test flushing IPv4 nexthop routes in compat mode
Date: Wed, 18 Nov 2026 16:45:10 +0800 [thread overview]
Message-ID: <20261118084510.332821-3-zypulsecore@gmail.com> (raw)
In-Reply-To: <20261118084510.332821-1-zypulsecore@gmail.com>
Exercise ip route flush on a route with a nexthop group while the dump
includes both the group's ID and the expanded paths. Check that the
flush succeeds and that the route is gone.
Both checks fail before the IPv4 delete fix and pass after it in a
QEMU/KVM guest with unmodified iproute2. Codex assisted with adding
the case to the existing compatibility selftest and running it.
Signed-off-by: Yuen Su <zypulsecore@gmail.com>
---
tools/testing/selftests/net/fib_nexthops.sh | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tools/testing/selftests/net/fib_nexthops.sh b/tools/testing/selftests/net/fib_nexthops.sh
index adbec51..d3c8cf8 100755
--- a/tools/testing/selftests/net/fib_nexthops.sh
+++ b/tools/testing/selftests/net/fib_nexthops.sh
@@ -2183,6 +2183,13 @@ ipv4_compat_mode()
stop_ip_monitor $ipmout 3
log_test $? 0 "IPv4 compat mode on - nexthop change"
+ run_cmd "$IP route add 192.0.2.1/32 nhid 122"
+ log_test $? 0 "IPv4 compat mode on - add route for flush"
+ run_cmd "$IP route flush to exact 192.0.2.1/32"
+ log_test $? 0 "IPv4 compat mode on - route flush"
+ check_route "192.0.2.1" ""
+ log_test $? 0 "IPv4 compat mode on - route removed by flush"
+
sysctl_nexthop_compat_mode_set 0 "IPv4"
# cleanup
prev parent reply other threads:[~2026-11-18 8:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 8:45 [PATCH net 0/2] ipv4: allow route dump replay with nexthop IDs Yuen Su
2026-11-18 8:45 ` [PATCH net 1/2] ipv4: accept nexthop dump attributes in route deletes Yuen Su
2026-11-18 8:45 ` Yuen Su [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=20261118084510.332821-3-zypulsecore@gmail.com \
--to=zypulsecore@gmail.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-api@vger.kernel.org \
--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 \
--cc=stephen@networkplumber.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