tailscale/wgengine
Avery Pennarun 0d4a0bf60e magicsock: if STUN failed to send before, rebind before STUNning again.
On iOS (and possibly other platforms), sometimes our UDP socket would
get stuck in a state where it was bound to an invalid interface (or no
interface) after a network reconfiguration. We can detect this by
actually checking the error codes from sending our STUN packets.

If we completely fail to send any STUN packets, we know something is
very broken. So on the next STUN attempt, let's rebind the UDP socket
to try to correct any problems.

This fixes a problem where iOS would sometimes get stuck using DERP
instead of direct connections until the backend was restarted.

Fixes #2994

Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
2021-10-08 02:17:09 +09:00
..
bench wgengine/wgcfg: use just the hexlified node key as the WireGuard endpoint. 2021-09-01 15:13:21 -07:00
filter cmd/cloner: add Clone context to regen struct assignments 2021-09-17 16:46:08 -07:00
magicsock magicsock: if STUN failed to send before, rebind before STUNning again. 2021-10-08 02:17:09 +09:00
monitor wgengine/monitor: ignore ipsec link monitor events on iOS/macOS 2021-09-27 20:45:51 -07:00
netstack wgengine/netstack: include DNS.ExtraRecords in DNSMap 2021-09-28 10:01:36 -07:00
router tstest: add MemLogger bytes.Buffer wrapper with Logf method 2021-09-07 15:33:45 -07:00
wgcfg cmd/cloner: add Clone context to regen struct assignments 2021-09-17 16:46:08 -07:00
wglog wgengine/wglog: Fix docstring on wireguardGoString to match args 2021-09-05 15:52:16 -07:00
winnet wgengine/winnet: don't build on non-windows 2021-02-09 21:09:24 -08:00
mem_ios.go go.mod: upgrade wireguard-windows, de-fork wireguard-go 2021-05-25 13:18:21 -07:00
pendopen.go cmd/tailscale: fix "tailscale ip $self-host-hostname" 2021-09-07 11:57:23 -07:00
userspace.go magicsock: if STUN failed to send before, rebind before STUNning again. 2021-10-08 02:17:09 +09:00
userspace_ext_test.go go.mod: upgrade wireguard-windows, de-fork wireguard-go 2021-05-25 13:18:21 -07:00
userspace_test.go all: close fake userspace engines when tests complete 2021-09-15 15:31:51 -07:00
watchdog.go wgengine: randomize client port if netmap says to 2021-06-23 08:51:37 -07:00
watchdog_test.go all: close fake userspace engines when tests complete 2021-09-15 15:31:51 -07:00
wgengine.go wgengine: randomize client port if netmap says to 2021-06-23 08:51:37 -07:00