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/netmon
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
..
defaultroute_bsd.go
defaultroute_darwin.go net/{netns, netmon}: use LastKnownDefaultInterface if set and check for utun (#16873) 4 months ago
interfaces_android.go types/result, util/lineiter: add package for a result type, use it 1 year ago
interfaces_bsd.go
interfaces_darwin.go
interfaces_darwin_test.go net/{netns, netmon}: use LastKnownDefaultInterface if set and check for utun (#16873) 4 months ago
interfaces_default_route_test.go
interfaces_defaultrouteif_todo.go
interfaces_freebsd.go
interfaces_linux.go types/result, util/lineiter: add package for a result type, use it 1 year ago
interfaces_linux_test.go
interfaces_test.go net/netmon: use Monitor's tsIfName if set by SetTailscaleInterfaceName 9 months ago
interfaces_windows.go
interfaces_windows_test.go
loghelper.go net/netmon, wgengine/magicsock: be quieter with portmapper logs 9 months ago
loghelper_test.go net/netmon: publish events to event bus 8 months ago
netmon.go wgengine/router: rely on events for deleted IP rules (#16744) 4 months ago
netmon_darwin.go net/netmon: publish events to event bus 8 months ago
netmon_darwin_test.go
netmon_freebsd.go net/netmon: publish events to event bus 8 months ago
netmon_linux.go wgengine/router: rely on events for deleted IP rules (#16744) 4 months ago
netmon_linux_test.go types/result, util/lineiter: add package for a result type, use it 1 year ago
netmon_polling.go net/netmon: publish events to event bus 8 months ago
netmon_test.go net/netmon: add tests for the events over the eventbus (#16382) 5 months ago
netmon_windows.go net/netmon: publish events to event bus 8 months ago
polling.go
state.go net/netmon: use Monitor's tsIfName if set by SetTailscaleInterfaceName 9 months ago