Make a permanet neighbor cache to avoid sending an NS packet disturbing the test
A receiver of an ICMPv6 request packet creates a stale cache entry and it turns into the delay state on replying the packet. After 5 second, the receiver sends an NS packet as a reachability confirmation, which disturbs the test and causes a unexpected result. Should fix PR misc/54451
This commit is contained in:
parent
48ffb757ab
commit
caa310059a
@ -1,4 +1,4 @@
|
||||
# $NetBSD: t_ndp.sh,v 1.33 2019/07/18 04:00:09 ozaki-r Exp $
|
||||
# $NetBSD: t_ndp.sh,v 1.34 2019/08/13 07:20:43 ozaki-r Exp $
|
||||
#
|
||||
# Copyright (c) 2015 The NetBSD Foundation, Inc.
|
||||
# All rights reserved.
|
||||
@ -114,6 +114,7 @@ get_timeout()
|
||||
|
||||
ndp_cache_expiration_body()
|
||||
{
|
||||
local macaddr=
|
||||
|
||||
rump_server_start $SOCKSRC netinet6
|
||||
rump_server_start $SOCKDST netinet6
|
||||
@ -121,12 +122,19 @@ ndp_cache_expiration_body()
|
||||
setup_dst_server
|
||||
setup_src_server
|
||||
|
||||
export RUMP_SERVER=$SOCKSRC
|
||||
|
||||
# Shorten the expire time of cache entries
|
||||
export RUMP_SERVER=$SOCKSRC
|
||||
atf_check -s exit:0 -o match:'basereachable=7s0ms' \
|
||||
rump.ndp -i shmif0 basereachable=7000
|
||||
|
||||
# Make a permanent cache entry to avoid sending an NS packet disturbing
|
||||
# the test
|
||||
macaddr=$(get_macaddr $SOCKSRC shmif0)
|
||||
export RUMP_SERVER=$SOCKDST
|
||||
atf_check -s exit:0 -o ignore rump.ndp -s $IP6SRC $macaddr
|
||||
|
||||
export RUMP_SERVER=$SOCKSRC
|
||||
|
||||
#
|
||||
# Check if a cache is expired expectedly
|
||||
#
|
||||
@ -710,6 +718,7 @@ wait_until_stalled()
|
||||
|
||||
ndp_cache_state_body()
|
||||
{
|
||||
local macaddr=
|
||||
|
||||
rump_server_start $SOCKSRC netinet6
|
||||
rump_server_start $SOCKDST netinet6
|
||||
@ -717,12 +726,19 @@ ndp_cache_state_body()
|
||||
setup_dst_server
|
||||
setup_src_server
|
||||
|
||||
export RUMP_SERVER=$SOCKSRC
|
||||
|
||||
# Shorten the expire time of cache entries
|
||||
export RUMP_SERVER=$SOCKSRC
|
||||
atf_check -s exit:0 -o match:'basereachable=7s0ms' \
|
||||
rump.ndp -i shmif0 basereachable=7000
|
||||
|
||||
# Make a permanent cache entry to avoid sending an NS packet disturbing
|
||||
# the test
|
||||
macaddr=$(get_macaddr $SOCKSRC shmif0)
|
||||
export RUMP_SERVER=$SOCKDST
|
||||
atf_check -s exit:0 -o ignore rump.ndp -s $IP6SRC $macaddr
|
||||
|
||||
export RUMP_SERVER=$SOCKSRC
|
||||
|
||||
#
|
||||
# Reachability confirmation (RFC 4861 7.3.3)
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user