aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-12-17 09:37:29 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2018-12-18 14:41:27 +0100
commitdb4719f7cb719393bf397ce3d6509a6874a331b2 (patch)
treeebf5c11090602abd58a29a250b4cb25ff6c311ba
parentwg-quick: bring interface up while setting MTU (diff)
downloadWireGuard-db4719f7cb719393bf397ce3d6509a6874a331b2.tar.xz
WireGuard-db4719f7cb719393bf397ce3d6509a6874a331b2.zip
netns: nmap != ncat
-rwxr-xr-xsrc/tests/netns.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tests/netns.sh b/src/tests/netns.sh
index 568612c..c5f2a0d 100755
--- a/src/tests/netns.sh
+++ b/src/tests/netns.sh
@@ -202,20 +202,20 @@ n1 ping -W 1 -c 1 192.168.241.2
# Test that crypto-RP filter works
n1 wg set wg0 peer "$pub2" allowed-ips 192.168.241.0/24
exec 4< <(n1 ncat -l -u -p 1111)
-nmap_pid=$!
+ncat_pid=$!
waitncatudp $netns1
n2 ncat -u 192.168.241.1 1111 <<<"X"
read -r -N 1 -t 1 out <&4 && [[ $out == "X" ]]
-kill $nmap_pid
+kill $ncat_pid
more_specific_key="$(pp wg genkey | pp wg pubkey)"
n1 wg set wg0 peer "$more_specific_key" allowed-ips 192.168.241.2/32
n2 wg set wg0 listen-port 9997
exec 4< <(n1 ncat -l -u -p 1111)
-nmap_pid=$!
+ncat_pid=$!
waitncatudp $netns1
n2 ncat -u 192.168.241.1 1111 <<<"X"
! read -r -N 1 -t 1 out <&4 || false
-kill $nmap_pid
+kill $ncat_pid
n1 wg set wg0 peer "$more_specific_key" remove
[[ $(n1 wg show wg0 endpoints) == "$pub2 [::1]:9997" ]]