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
Jonathan Nobels 6006bc92b5
net/{netns, netmon}: use LastKnownDefaultInterface if set and check for utun (#16873)
fixes tailscale/corp#31299

Fixes two issues:
getInterfaceIndex would occasionally race with netmon's state, returning
the cached default interface index after it had be changed by NWNetworkMonitor.
This had the potential to cause connections to bind to the prior default.  The fix
here is to preferentially use the interface index provided by NWNetworkMonitor
preferentially.

When no interfaces are available, macOS will set the tunnel as the default
interface when an exit node is enabled, potentially causing getInterfaceIndex
to return utun's index.  We now guard against this when taking the
defaultIdx path.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
4 months ago
..
mksyscall.go net/netns: add Windows support for bind-to-interface-by-route 1 year ago
netns.go net/netns: add Windows support for bind-to-interface-by-route 1 year ago
netns_android.go all: avoid repeated default interface lookups 3 years ago
netns_darwin.go net/{netns, netmon}: use LastKnownDefaultInterface if set and check for utun (#16873) 4 months ago
netns_darwin_test.go net/{interfaces,netmon}, all: merge net/interfaces package into net/netmon 2 years ago
netns_default.go all: avoid repeated default interface lookups 3 years ago
netns_dw.go net/netns: remove some logspam by avoiding logging parse errors due to unspecified addresses 1 year ago
netns_linux.go net/{interfaces,netmon}, all: merge net/interfaces package into net/netmon 2 years ago
netns_linux_test.go util/linuxfw: decoupling IPTables logic from linux router 2 years ago
netns_test.go all: avoid repeated default interface lookups 3 years ago
netns_windows.go net/netns: remove some logspam by avoiding logging parse errors due to unspecified addresses 1 year ago
netns_windows_test.go net/netns: add Windows support for bind-to-interface-by-route 1 year ago
socks.go all: remove non-applicable "linux" deps on Android 7 months ago
zsyscall_windows.go net/netns: add Windows support for bind-to-interface-by-route 1 year ago