Module Name: src
Committed By: ozaki-r
Date: Mon Aug 26 07:41:51 UTC 2019
Modified Files:
src/tests/net/net: t_ipv6address.sh
Log Message:
tests: add tests for IPv6 link-local addresses with a scope ID
Setting an address with a scope ID doesn't work for rump.ifconfig for some
reasons and needs $HIJACKING for now. The bug should be fixed someday.
To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/tests/net/net/t_ipv6address.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/net/net/t_ipv6address.sh
diff -u src/tests/net/net/t_ipv6address.sh:1.15 src/tests/net/net/t_ipv6address.sh:1.16
--- src/tests/net/net/t_ipv6address.sh:1.15 Mon May 13 17:55:09 2019
+++ src/tests/net/net/t_ipv6address.sh Mon Aug 26 07:41:50 2019
@@ -1,4 +1,4 @@
-# $NetBSD: t_ipv6address.sh,v 1.15 2019/05/13 17:55:09 bad Exp $
+# $NetBSD: t_ipv6address.sh,v 1.16 2019/08/26 07:41:50 ozaki-r Exp $
#
# Copyright (c) 2015 Internet Initiative Japan Inc.
# All rights reserved.
@@ -247,6 +247,7 @@ linklocal_body()
local dst_if0_lladdr=`get_linklocal_addr ${SOCKDST} shmif0`
local fwd_if0_lladdr=`get_linklocal_addr ${SOCKFWD} shmif0`
local fwd_if1_lladdr=`get_linklocal_addr ${SOCKFWD} shmif1`
+ local lladdr=fe80::2
export RUMP_SERVER=${SOCKSRC}
$DEBUG && rump.ifconfig
@@ -325,6 +326,19 @@ linklocal_body()
atf_check -s ignore -o not-empty -e ignore \
-x "shmif_dumpbus -p - ${BUS2} | tcpdump -r - -n -p icmp6"
+ # Setting a link-local address with a scope ID
+ # XXX need $HIJACKING for some reasons
+ cleanup_bus
+ export RUMP_SERVER=${SOCKFWD}
+ $DEBUG && rump.ifconfig shmif0
+ atf_check -s exit:0 $HIJACKING rump.ifconfig shmif0 inet6 $lladdr%shmif0/64
+ export RUMP_SERVER=${SOCKSRC}
+ atf_check -s exit:0 -o match:"0.0% packet loss" rump.ping6 -c 1 \
+ -X $TIMEOUT -n $lladdr
+ export RUMP_SERVER=${SOCKDST}
+ atf_check -s not-exit:0 -o match:"100.0% packet loss" rump.ping6 -c 1 \
+ -X $TIMEOUT -n $lladdr
+
unset RUMP_SERVER
}