tailscale/net/netmon
Jonathan Nobels 3e89068792
net/netmon, wgengine/userspace: purge ChangeDelta.Major and address TODOs (#17823)
updates tailscale/corp#33891

Addresses several older the TODO's in netmon.  This removes the 
Major flag precomputes the ChangeDelta state, rather than making
consumers of ChangeDeltas sort that out themselves.   We're also seeing
a lot of ChangeDelta's being flagged as "Major" when they are
not interesting, triggering rebinds in wgengine that are not needed.  This
cleans that up and adds a host of additional tests.

The dependencies are cleaned, notably removing dependency on netmon
itself for calculating what is interesting, and what is not.  This includes letting
individual platforms set a bespoke global "IsInterestingInterface"
function.  This is only used on Darwin.

RebindRequired now roughly follows how "Major" was historically
calculated but includes some additional checks for various
uninteresting events such as changes in interface addresses that
shouldn't trigger a rebind.  This significantly reduces thrashing (by
roughly half on Darwin clients which switching between nics).   The individual
values that we roll  into RebindRequired are also exposed so that
components consuming netmap.ChangeDelta can ask more
targeted questions.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
2025-12-17 12:32:40 -05:00
..
defaultroute_bsd.go net/netmon: swap to swift-derived defaultRoute on macos (#11936) 2024-05-01 09:20:09 -04:00
defaultroute_darwin.go net/{netns, netmon}: use LastKnownDefaultInterface if set and check for utun (#16873) 2025-08-15 13:04:23 -07:00
interfaces_android.go types/result, util/lineiter: add package for a result type, use it 2024-11-05 10:27:52 -08:00
interfaces_bsd.go net/{interfaces,netmon}, all: merge net/interfaces package into net/netmon 2024-04-28 07:34:52 -07:00
interfaces_darwin_test.go net/{netns, netmon}: use LastKnownDefaultInterface if set and check for utun (#16873) 2025-08-15 13:04:23 -07:00
interfaces_darwin.go syncs: add Mutex/RWMutex alias/wrappers for future mutex debugging 2025-11-16 19:13:59 -08:00
interfaces_default_route_test.go net/{interfaces,netmon}, all: merge net/interfaces package into net/netmon 2024-04-28 07:34:52 -07:00
interfaces_defaultrouteif_todo.go net/{interfaces,netmon}, all: merge net/interfaces package into net/netmon 2024-04-28 07:34:52 -07:00
interfaces_freebsd.go net/{interfaces,netmon}, all: merge net/interfaces package into net/netmon 2024-04-28 07:34:52 -07:00
interfaces_linux_test.go net/{interfaces,netmon}, all: merge net/interfaces package into net/netmon 2024-04-28 07:34:52 -07:00
interfaces_linux.go feature/featuretags: add features for c2n, peerapi, advertise/use routes/exit nodes 2025-10-02 12:48:12 -07:00
interfaces_test.go net/netmon: use Monitor's tsIfName if set by SetTailscaleInterfaceName 2025-03-24 13:34:02 -07:00
interfaces_windows_test.go net/{interfaces,netmon}, all: merge net/interfaces package into net/netmon 2024-04-28 07:34:52 -07:00
interfaces_windows.go feature, net/tshttpproxy: pull out support for using proxies as a feature 2025-09-30 10:25:56 -07:00
loghelper_test.go net/netmon, wgengine/userspace: purge ChangeDelta.Major and address TODOs (#17823) 2025-12-17 12:32:40 -05:00
loghelper.go net/netmon, wgengine/userspace: purge ChangeDelta.Major and address TODOs (#17823) 2025-12-17 12:32:40 -05:00
netmon_darwin_test.go all: move network monitoring from wgengine/monitor to net/netmon 2023-04-20 10:15:59 -07:00
netmon_darwin.go net/netmon, wgengine/userspace: purge ChangeDelta.Major and address TODOs (#17823) 2025-12-17 12:32:40 -05:00
netmon_freebsd.go net/netmon, wgengine/userspace: purge ChangeDelta.Major and address TODOs (#17823) 2025-12-17 12:32:40 -05:00
netmon_linux_test.go types/result, util/lineiter: add package for a result type, use it 2024-11-05 10:27:52 -08:00
netmon_linux.go net/netmon, wgengine/userspace: purge ChangeDelta.Major and address TODOs (#17823) 2025-12-17 12:32:40 -05:00
netmon_polling.go net/netmon: publish events to event bus 2025-04-16 10:10:45 -07:00
netmon_test.go net/netmon, wgengine/userspace: purge ChangeDelta.Major and address TODOs (#17823) 2025-12-17 12:32:40 -05:00
netmon_windows.go net/netmon, wgengine/userspace: purge ChangeDelta.Major and address TODOs (#17823) 2025-12-17 12:32:40 -05:00
netmon.go net/netmon, wgengine/userspace: purge ChangeDelta.Major and address TODOs (#17823) 2025-12-17 12:32:40 -05:00
polling.go net/netmon, wgengine/userspace: purge ChangeDelta.Major and address TODOs (#17823) 2025-12-17 12:32:40 -05:00
state.go net/netmon, wgengine/userspace: purge ChangeDelta.Major and address TODOs (#17823) 2025-12-17 12:32:40 -05:00