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: feda329622 ("netinet6 tests: Add a regression test for default router handling")
MFC after: 1 week
Sponsored by: Klara, Inc.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user