From 1fb21d1665511db1f5bd5e3f12e00c2dd118bd62 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 1 Jun 2021 12:10:49 +0200 Subject: netns: account for FreeBSD 12 quirks In ping6, -W -> -x, and DAD affects bind(), so disable it. Signed-off-by: Jason A. Donenfeld --- tests/netns.sh | 9 +++++++-- 1 file 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 & -- cgit v1.2.3-59-g8ed1b