mirror of
https://github.com/tailscale/tailscale.git
synced 2026-09-13 06:19:11 -04:00
runProbe records IPv4CanSend or IPv6CanSend after SendPacket returns successfully. A sufficiently fast STUN response can be received and processed before that return, however, and the report can be cloned in the intervening window. That produces a contradictory report with UDP and a valid mapping, but CanSend false. Magicsock treats that as a send failure and unnecessarily rebinds, perturbing tailcat tests. A received STUN response itself proves that its address family sent successfully, so also mark the family sendable while recording the response. Before this, the tailcat test flaked after ~3700 runs under flakestress. Now it can run 30 minutes (12,203 successful runs). Updates tailscale/tailcat#73 Change-Id: I54fe2e81fc703fac36f693e9dbf0c3fa27d119b1 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>