Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/tests/net/ndp Pull up following revision(s) (requested by...



details:   https://anonhg.NetBSD.org/src/rev/47deba6ce803
branches:  netbsd-9
changeset: 458251:47deba6ce803
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Aug 26 14:11:04 2019 +0000

description:
Pull up following revision(s) (requested by ozaki-r in ticket #117):

        tests/net/ndp/t_ndp.sh: revision 1.34

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 018e5afc7597 -r 47deba6ce803 tests/net/ndp/t_ndp.sh
--- a/tests/net/ndp/t_ndp.sh    Mon Aug 26 14:06:56 2019 +0000
+++ b/tests/net/ndp/t_ndp.sh    Mon Aug 26 14:11:04 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.33.2.1 2019/08/26 14:11:04 martin 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