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 643e91f2eb
net/netmon: move TailscaleInterfaceIndex out of netmon.State (#18428)
fixes tailscale/tailscale#18418

Both Serve and PeerAPI broke when we moved the TailscaleInterfaceName
into State, which is updated asynchronously and may not be
available when we configure the listeners.

This extracts the explicit interface name property from netmon.State
and adds as a static struct with getters that have proper error
handling.

The bug is only found in sandboxed Darwin clients, where we
need to know the Tailscale interface details in order to set up the
listeners correctly (they must bind to our interface explicitly to escape
the network sandboxing that is applied by NECP).

Currently set only sandboxed macOS and Plan9 set this but it will
also be useful on Windows to simplify interface filtering in netns.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
1 day ago
..
defaultroute_bsd.go net/netmon: swap to swift-derived defaultRoute on macos (#11936) 2 years ago
defaultroute_darwin.go net/{netns, netmon}: use LastKnownDefaultInterface if set and check for utun (#16873) 5 months ago
interfaces.go net/netmon: move TailscaleInterfaceIndex out of netmon.State (#18428) 1 day ago
interfaces_android.go types/result, util/lineiter: add package for a result type, use it 1 year ago
interfaces_bsd.go net/{interfaces,netmon}, all: merge net/interfaces package into net/netmon 2 years ago
interfaces_darwin.go syncs: add Mutex/RWMutex alias/wrappers for future mutex debugging 2 months ago
interfaces_darwin_test.go net/{netns, netmon}: use LastKnownDefaultInterface if set and check for utun (#16873) 5 months ago
interfaces_default_route_test.go net/{interfaces,netmon}, all: merge net/interfaces package into net/netmon 2 years ago
interfaces_defaultrouteif_todo.go net/{interfaces,netmon}, all: merge net/interfaces package into net/netmon 2 years ago
interfaces_freebsd.go net/{interfaces,netmon}, all: merge net/interfaces package into net/netmon 2 years ago
interfaces_linux.go feature/featuretags: add features for c2n, peerapi, advertise/use routes/exit nodes 4 months ago
interfaces_linux_test.go net/{interfaces,netmon}, all: merge net/interfaces package into net/netmon 2 years ago
interfaces_test.go net/netmon: use Monitor's tsIfName if set by SetTailscaleInterfaceName 10 months ago
interfaces_windows.go feature, net/tshttpproxy: pull out support for using proxies as a feature 4 months ago
interfaces_windows_test.go net/{interfaces,netmon}, all: merge net/interfaces package into net/netmon 2 years ago
loghelper.go net/netmon, wgengine/userspace: purge ChangeDelta.Major and address TODOs (#17823) 1 month ago
loghelper_test.go net/netmon: move TailscaleInterfaceIndex out of netmon.State (#18428) 1 day ago
netmon.go net/netmon: move TailscaleInterfaceIndex out of netmon.State (#18428) 1 day ago
netmon_darwin.go net/netmon, wgengine/userspace: purge ChangeDelta.Major and address TODOs (#17823) 1 month ago
netmon_darwin_test.go all: move network monitoring from wgengine/monitor to net/netmon 3 years ago
netmon_freebsd.go net/netmon, wgengine/userspace: purge ChangeDelta.Major and address TODOs (#17823) 1 month ago
netmon_linux.go net/netmon, wgengine/userspace: purge ChangeDelta.Major and address TODOs (#17823) 1 month 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 9 months ago
netmon_test.go net/netmon: move TailscaleInterfaceIndex out of netmon.State (#18428) 1 day ago
netmon_windows.go net/netmon, wgengine/userspace: purge ChangeDelta.Major and address TODOs (#17823) 1 month ago
polling.go net/netmon, wgengine/userspace: purge ChangeDelta.Major and address TODOs (#17823) 1 month ago
state.go net/netmon: move TailscaleInterfaceIndex out of netmon.State (#18428) 1 day ago