tailscale/wgengine/magicsock
Josh Bleecher Snyder c7e5ab8094 wgengine/magicsock: retry and re-send packets in TestTwoDevicePing
When a handshake race occurs, a queued data packet can get lost.
TestTwoDevicePing expected that the very first data packet would arrive.
This caused occasional flakes.

Change TestTwoDevicePing to repeatedly re-send packets
and succeed when one of them makes it through.

This is acceptable (vs making WireGuard not drop the packets)
because this only affects communication with extremely old clients.
And those extremely old clients will eventually connect,
because the kernel will retry sends on timeout.

Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2021-02-12 14:18:58 -08:00
..
discopingpurpose_string.go wgengine/magicsock: make discoPingPurpose a stringer 2020-09-14 14:29:28 -07:00
legacy.go wgengine/magicsock: unify on netaddr types in addrSet 2021-02-12 09:52:43 -08:00
magicsock_test.go wgengine/magicsock: retry and re-send packets in TestTwoDevicePing 2021-02-12 14:18:58 -08:00
magicsock.go wgengine/magicsock: reduce log spam during tests 2021-02-12 10:49:02 -08:00