aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-06-01 12:10:49 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2021-06-01 15:27:11 +0200
commit1fb21d1665511db1f5bd5e3f12e00c2dd118bd62 (patch)
tree080b35b3f90b01efb60ea9a6d5c7d7b0bff497fb /tests
parentnetns: trim test to working parts and rework jail logic (diff)
downloadwireguard-freebsd-1fb21d1665511db1f5bd5e3f12e00c2dd118bd62.tar.xz
wireguard-freebsd-1fb21d1665511db1f5bd5e3f12e00c2dd118bd62.zip
netns: account for FreeBSD 12 quirks
In ping6, -W -> -x, and DAD affects bind(), so disable it. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/netns.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/netns.sh b/tests/netns.sh
index d8a1ac7..6cc0c63 100755
--- a/tests/netns.sh
+++ b/tests/netns.sh
@@ -46,6 +46,9 @@ jid0="$(pp jail -ic path=/ vnet=new children.max=2 persist)"
jid1="$(j0 jail -ic path=/ vnet=new persist)"
jid2="$(j0 jail -ic path=/ vnet=new persist)"
+j0 sysctl net.inet6.ip6.dad_count=0
+j1 sysctl net.inet6.ip6.dad_count=0
+j2 sysctl net.inet6.ip6.dad_count=0
ifconfig0 lo0 127.0.0.1/8
ifconfig0 lo0 inet6 ::1/128
ifconfig0 lo0 up
@@ -84,8 +87,10 @@ tests() {
j1 ping -c 10 -f -W 1 192.168.241.2
# Ping over IPv6
- j2 ping6 -c 10 -f -W 1 fd00::1
- j1 ping6 -c 10 -f -W 1 fd00::2
+ local wtarg=-W
+ [[ $(ping6 2>&1) == *"-x waittime"* ]] && wtarg=-x # Terrible FreeBSD12ism, fixed in 13
+ j2 ping6 -c 10 -f $wtarg 1 fd00::1
+ j1 ping6 -c 10 -f $wtarg 1 fd00::2
# TCP over IPv4
j2 iperf3 -s -1 -B 192.168.241.2 &