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/wgengine
Jonathan Nobels 2b7f8b6be7 net/netmon: remove ChangeDelta.Major and start the TODOs
updates tailscale/corp#33891

We've had some TODO's in netmon for ages related to asking
more pointed questions of ChangeDelta.  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 removes the "Major" flag and replaces it with a set of
precomputed values that hint at what the ChangeDelta means.

 The dependencies are cleaned up a bit,
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 was only used on Darwin.

RebindRequired roughly flows from 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 to minimize thrashing.   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>

wgengine/userspace: skip rebind and restun if all of our interfaces are down

updates tailscale/corp#33891

Skip rebind and restun if we have called SetNetworkUp with false.  Neither
cares about this state and it's just flappy to try to reStun and rebind if
there are no usable interfaces available.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>

Add viability flag and fix bug in state
1 day ago
..
bench types/netmap: remove PrivateKey from NetworkMap 3 weeks ago
filter wgengine/filter: add check for unknown proto 11 months ago
magicsock net/tstun: add TSMPDiscoAdvertisement to TSMPPing (#17995) 2 weeks ago
netlog wgengine/netlog: strip dot suffix from node name (#17954) 3 weeks ago
netstack all: rename variables with lowercase-l/uppercase-I 3 weeks ago
router all: rename variables with lowercase-l/uppercase-I 3 weeks ago
wgcfg types/netmap: remove PrivateKey from NetworkMap 3 weeks ago
wgint wgengine{,/wgint}: add wgint.Peer wrapper type, add to wgengine.Engine 2 years ago
wglog all: use Go 1.22 range-over-int 2 years ago
winnet all: add test for package comments, fix, add comments as needed 1 year ago
mem_ios.go all: update copyright and license headers 3 years ago
pendopen.go wgengine: stop importing flowtrack when unused 2 months ago
pendopen_omit.go wgengine: stop importing flowtrack when unused 2 months ago
userspace.go net/netmon: remove ChangeDelta.Major and start the TODOs 1 day ago
userspace_ext_test.go health,ipn/ipnlocal: introduce eventbus in heath.Tracker (#17085) 3 months ago
userspace_test.go net/tstun: add TSMPDiscoAdvertisement to TSMPPing (#17995) 2 weeks ago
watchdog.go ipn/ipnlocal: remove all the weird locking (LockedOnEntry, UnlockEarly, etc) 3 weeks ago
watchdog_omit.go ipn/ipnlocal, engine: avoid runtime/pprof with two usages of ts_omit_debug 2 months ago
watchdog_test.go health,ipn/ipnlocal: introduce eventbus in heath.Tracker (#17085) 3 months ago
wgengine.go ipn/ipnlocal: remove all the weird locking (LockedOnEntry, UnlockEarly, etc) 3 weeks ago