git: 1eb727727a9a - main - ndp tests: Fix flakiness in ndp_slaac_default_route
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 17 Feb 2026 20:22:37 UTC
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=1eb727727a9acb5f1e66e3f70b0146e7c9c5f710
commit 1eb727727a9acb5f1e66e3f70b0146e7c9c5f710
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-02-17 19:03:35 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-02-17 20:22:05 +0000
ndp tests: Fix flakiness in ndp_slaac_default_route
The test sends RAs in order to test SLAAC handling in another host.
The router needs to also set net.inet6.ip6.forwarding=1, otherwise NAs
sent from it have the ROUTER flag clear, and upon receiving such an NA
the host will automatically delete routes learned from the router.
Fixes: feda329622bc ("netinet6 tests: Add a regression test for default router handling")
MFC after: 1 week
Sponsored by: Klara, Inc.
---
tests/sys/netinet6/ndp.sh | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tests/sys/netinet6/ndp.sh b/tests/sys/netinet6/ndp.sh
index 159a51485c49..c8de4083a9ea 100755
--- a/tests/sys/netinet6/ndp.sh
+++ b/tests/sys/netinet6/ndp.sh
@@ -152,7 +152,10 @@ ndp_slaac_default_route_body() {
ndp_if_up ${epair0}b
atf_check jexec ${jname} ifconfig ${epair0}a inet6 accept_rtadv
- # Send an RA advertising a prefix.
+ # Make sure that NAs from us are flagged as coming from a router.
+ atf_check -o ignore sysctl net.inet6.ip6.forwarding=1
+
+ # Send an RA advertising a prefix.
atf_check -e ignore python3 $(atf_get_srcdir)/ra.py \
--sendif ${epair0}b \
--dst $(ndp_if_lladdr ${epair0}a ${jname}) \
@@ -167,7 +170,7 @@ ndp_slaac_default_route_body() {
jexec ${jname} netstat -rn -6
# Get rid of the default route.
- jexec ${jname} route -6 flush
+ atf_check -o ignore jexec ${jname} route -6 flush
atf_check -o not-match:"^default[[:space:]]+fe80:" \
jexec ${jname} netstat -rn -6