You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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>
4 years ago
..
dns net/dns/resolver: add unsecured Quad9 resolvers 4 years ago
dnscache net/{dnscache,interfaces}: use netaddr.IP.IsPrivate, delete copied code 4 years ago
dnsfallback net/tlsdial: bake in LetsEncrypt's ISRG Root X1 root 4 years ago
flowtrack fix: typo spelling grammar 4 years ago
interfaces net/interfaces: add RegisterInterfaceGetter for Android 4 years ago
netcheck magicsock: if STUN failed to send before, rebind before STUNning again. 4 years ago
netknob all: disable TCP keep-alives on iOS/Android 4 years ago
netns all: disable TCP keep-alives on iOS/Android 4 years ago
netstat all: gofmt with Go 1.17 4 years ago
nettest net/nettest: make nettest.NewConn pass x/net/nettest.TestConn. 5 years ago
packet net/packet: use netaddr AppendTo methods 5 years ago
portmapper all: update tests to use tstest.MemLogger 4 years ago
socks5 net/socks5/tssocks: add a SOCKS5 dialer type, method-ifying code 5 years ago
speedtest Implemented Commandline Download Speedtest (#2064) 5 years ago
stun all: gofmt with Go 1.17 4 years ago
tlsdial net/tlsdial: add forgotten test file for go mod tidy 4 years ago
tsaddr ipn/ipnlocal: for IPv6-only nodes, publish IPv6 MagicDNS records of peers 4 years ago
tshttpproxy all: gofmt with Go 1.17 4 years ago
tstun net/tstun: block looped disco traffic, take 17 4 years ago