diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-01-22 13:38:52 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-01-23 14:29:44 +0100 |
commit | 49c240044ca638128a35e4fc55d86c727d3b2b1f (patch) | |
tree | 4855020bd05898c165d7aa4300a4c7bb527f432f /src/tests | |
parent | f43eabd5616d5dd114b1818867e4c51d3c24dbd3 (diff) |
netlink: use __kernel_timespec for handshake time
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/tests')
-rwxr-xr-x | src/tests/netns.sh | 4 |
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 |