summaryrefslogtreecommitdiffstatshomepage
path: root/src/tests
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-01-22 13:38:52 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2019-01-23 14:29:44 +0100
commit49c240044ca638128a35e4fc55d86c727d3b2b1f (patch)
tree4855020bd05898c165d7aa4300a4c7bb527f432f /src/tests
parentglobal: normalize -> clamp (diff)
downloadwireguard-linux-compat-49c240044ca638128a35e4fc55d86c727d3b2b1f.tar.xz
wireguard-linux-compat-49c240044ca638128a35e4fc55d86c727d3b2b1f.zip
netlink: use __kernel_timespec for handshake time
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/tests')
-rwxr-xr-xsrc/tests/netns.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tests/netns.sh b/src/tests/netns.sh
index 6ef61a5..46c30e5 100755
--- a/src/tests/netns.sh
+++ b/src/tests/netns.sh
@@ -142,7 +142,7 @@ big_mtu=$(( 34816 - 1500 + $orig_mtu ))
# Test using IPv4 as outer transport
n1 wg set wg0 peer "$pub2" endpoint 127.0.0.1:2
n2 wg set wg0 peer "$pub1" endpoint 127.0.0.1:1
-# Before calling tests, we first make sure that the stats counters are working
+# Before calling tests, we first make sure that the stats counters and timestamper are working
n2 ping -c 10 -f -W 1 192.168.241.1
{ read _; read _; read _; read rx_bytes _; read _; read tx_bytes _; } < <(ip2 -stats link show dev wg0)
(( rx_bytes == 1372 && (tx_bytes == 1428 || tx_bytes == 1460) ))
@@ -152,6 +152,8 @@ read _ rx_bytes tx_bytes < <(n2 wg show wg0 transfer)
(( rx_bytes == 1372 && (tx_bytes == 1428 || tx_bytes == 1460) ))
read _ rx_bytes tx_bytes < <(n1 wg show wg0 transfer)
(( tx_bytes == 1372 && (rx_bytes == 1428 || rx_bytes == 1460) ))
+read _ timestamp < <(n1 wg show wg0 latest-handshakes)
+(( timestamp != 0 ))
tests
ip1 link set wg0 mtu $big_mtu