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/netns
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>
3 years ago
..
netns.go syncs, all: move to using Go's new atomic types instead of ours 3 years ago
netns_android.go all: remove old +build tags 3 years ago
netns_darwin.go net/netns, net/interfaces: explicitly bind sockets to the default interface on all Darwin variants 3 years ago
netns_default.go net/netns, net/interfaces: explicitly bind sockets to the default interface on all Darwin variants 3 years ago
netns_linux.go all: remove old +build tags 3 years ago
netns_linux_test.go net/netns: support !CAP_NET_ADMIN 4 years ago
netns_test.go net/netns: thread logf into control functions 4 years ago
netns_windows.go net/netns: thread logf into control functions 4 years ago
socks.go all: remove old +build tags 3 years ago