diff options
| author | Mark Johnston <markj@FreeBSD.org> | 2026-02-17 19:03:35 +0000 |
|---|---|---|
| committer | Mark Johnston <markj@FreeBSD.org> | 2026-02-17 20:22:05 +0000 |
| commit | 1eb727727a9acb5f1e66e3f70b0146e7c9c5f710 (patch) | |
| tree | 5905d51e5a43d6012447696c29eaa2f3d873709b | |
| parent | eb425dfab19be8720cf29d560b4e778fc3531106 (diff) | |
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.
| -rwxr-xr-x | tests/sys/netinet6/ndp.sh | 7 |
1 files 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 |
