Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/net/ndp Make a permanet neighbor cache to avoid sendin...
details: https://anonhg.NetBSD.org/src/rev/3c85600c1c42
branches: trunk
changeset: 964701:3c85600c1c42
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Tue Aug 13 07:20:43 2019 +0000
description:
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
diffstat:
tests/net/ndp/t_ndp.sh | 26 +++++++++++++++++++++-----
1 files changed, 21 insertions(+), 5 deletions(-)
diffs (69 lines):
diff -r 0e6f313e8d9a -r 3c85600c1c42 tests/net/ndp/t_ndp.sh
--- a/tests/net/ndp/t_ndp.sh Tue Aug 13 07:09:49 2019 +0000
+++ b/tests/net/ndp/t_ndp.sh Tue Aug 13 07:20:43 2019 +0000
@@ -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 @@
ndp_cache_expiration_body()
{
+ local macaddr=
rump_server_start $SOCKSRC netinet6
rump_server_start $SOCKDST netinet6
@@ -121,12 +122,19 @@
setup_dst_server
setup_src_server
+ # Shorten the expire time of cache entries
export RUMP_SERVER=$SOCKSRC
-
- # Shorten the expire time of cache entries
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 @@
ndp_cache_state_body()
{
+ local macaddr=
rump_server_start $SOCKSRC netinet6
rump_server_start $SOCKDST netinet6
@@ -717,12 +726,19 @@
setup_dst_server
setup_src_server
+ # Shorten the expire time of cache entries
export RUMP_SERVER=$SOCKSRC
-
- # Shorten the expire time of cache entries
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)
#
Home |
Main Index |
Thread Index |
Old Index