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/interfaces
Mihai Parparita 79f3a5d753 net/netns, net/interfaces: explicitly bind sockets to the default interface on all Darwin variants
We were previously only doing this for tailscaled-on-Darwin, but it also
appears to help on iOS. Otherwise, when we rebind magicsock UDP
connections after a cellular -> WiFi interface change they still keep
using cellular one.

To do this correctly when using exit nodes, we need to exclude the
Tailscale interface when getting the default route, otherwise packets
cannot leave the tunnel. There are native macOS/iOS APIs that we can
use to do this, so we allow those clients to override the implementation
of DefaultRouteInterfaceIndex.

Updates #6565, may also help with #5156

Signed-off-by: Mihai Parparita <mihai@tailscale.com>
2 years ago
..
interfaces.go ipn/ipnlocal: don't warn about serve listener failing on IPv6-less machines 2 years ago
interfaces_bsd.go net/netns, net/interfaces: explicitly bind sockets to the default interface on all Darwin variants 2 years ago
interfaces_darwin.go net/interfaces: deduplicate route table parsing on Darwin and FreeBSD 2 years ago
interfaces_darwin_test.go net/interfaces: improve default route detection 2 years ago
interfaces_default_route_test.go all: remove old +build tags 2 years ago
interfaces_defaultrouteif_todo.go all: remove old +build tags 2 years ago
interfaces_freebsd.go all: remove old +build tags 2 years ago
interfaces_linux.go syncs, all: move to using Go's new atomic types instead of ours 2 years ago
interfaces_linux_test.go refactor: move from io/ioutil to io and os packages 2 years ago
interfaces_test.go all: convert more code to use net/netip directly 2 years ago
interfaces_windows.go go.mod: bump wireguard/windows, which moves to using net/netip 2 years ago
interfaces_windows_test.go net/interfaces: quiet PAC detection logging in no-PAC case, add benchmark 4 years ago