tailscale/net
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
..
dns net/dns/resolver: add unsecured Quad9 resolvers 2021-09-30 18:08:19 -07:00
dnscache net/{dnscache,interfaces}: use netaddr.IP.IsPrivate, delete copied code 2021-07-26 20:30:28 -07:00
dnsfallback net/tlsdial: bake in LetsEncrypt's ISRG Root X1 root 2021-10-01 08:30:07 -07:00
flowtrack fix: typo spelling grammar 2021-08-24 07:55:04 -07:00
interfaces net/interfaces: add RegisterInterfaceGetter for Android 2021-10-06 10:43:12 -07:00
netcheck magicsock: if STUN failed to send before, rebind before STUNning again. 2021-10-08 02:17:09 +09:00
netknob all: disable TCP keep-alives on iOS/Android 2021-09-28 12:03:18 -07:00
netns all: disable TCP keep-alives on iOS/Android 2021-09-28 12:03:18 -07:00
netstat all: gofmt with Go 1.17 2021-08-05 15:54:00 -07:00
nettest net/nettest: make nettest.NewConn pass x/net/nettest.TestConn. 2021-04-06 15:34:29 -07:00
packet net/packet: use netaddr AppendTo methods 2021-05-20 20:42:18 -07:00
portmapper all: update tests to use tstest.MemLogger 2021-09-07 20:06:15 -07:00
socks5 net/socks5/tssocks: add a SOCKS5 dialer type, method-ifying code 2021-06-28 13:12:42 -07:00
speedtest Implemented Commandline Download Speedtest (#2064) 2021-07-15 14:43:13 -04:00
stun all: gofmt with Go 1.17 2021-08-05 15:54:00 -07:00
tlsdial net/tlsdial: add forgotten test file for go mod tidy 2021-10-01 10:30:01 -07:00
tsaddr ipn/ipnlocal: for IPv6-only nodes, publish IPv6 MagicDNS records of peers 2021-10-04 08:54:23 -07:00
tshttpproxy all: gofmt with Go 1.17 2021-08-05 15:54:00 -07:00
tstun net/tstun: block looped disco traffic, take 17 2021-09-29 14:17:40 -07:00