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
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
..
ace feature/ace: make ACE modular 2 months ago
art all: rename variables with lowercase-l/uppercase-I 3 weeks ago
bakedroots tstest/tlstest: simplify, don't even bake in any keys 6 months ago
batching net/batching: fix import formatting 2 weeks ago
captivedetection syncs: add Mutex/RWMutex alias/wrappers for future mutex debugging 3 weeks ago
connectproxy net/tlsdial: fix TLS cert validation of HTTPS proxies 6 months ago
dns all: rename variables with lowercase-l/uppercase-I 3 weeks ago
dnscache syncs: add Mutex/RWMutex alias/wrappers for future mutex debugging 3 weeks ago
dnsfallback feature, net/tshttpproxy: pull out support for using proxies as a feature 2 months ago
flowtrack net/flowtrack: fix, test String method 1 year ago
ipset all: use iterators over slice views more 1 year ago
ktimeout all: rename variables with lowercase-l/uppercase-I 3 weeks ago
memnet all: rename variables with lowercase-l/uppercase-I 3 weeks ago
netaddr all: rename variables with lowercase-l/uppercase-I 3 weeks ago
netcheck all: rename variables with lowercase-l/uppercase-I 3 weeks ago
neterror net/neterror, wgengine/magicsock: use UDP GSO and GRO on Linux (#7791) 3 years ago
netkernelconf all: remove non-applicable "linux" deps on Android 7 months ago
netknob all: update copyright and license headers 3 years ago
netmon net/netmon: remove ChangeDelta.Major and start the TODOs 1 day ago
netns net/netns: remove spammy logs for interface binding caps 2 weeks ago
netstat all: add test for package comments, fix, add comments as needed 1 year ago
netutil syncs: add Mutex/RWMutex alias/wrappers for future mutex debugging 3 weeks ago
netx net/{netx,memnet},all: add netx.DialFunc, move memnet Network impl 8 months ago
packet net/tstun: add TSMPDiscoAdvertisement to TSMPPing (#17995) 2 weeks ago
ping syncs: add Mutex/RWMutex alias/wrappers for future mutex debugging 3 weeks ago
portmapper go.mod: bump golang.org/x/crypto (#17907) 3 weeks ago
proxymux all: cleanup unused code, part 1 (#10661) 2 years ago
routetable net/routetable: don't try to fetch the route table on android 8 months ago
sockopts wgengine/magicsock,net/sockopts: export Windows ICMP suppression logic (#16917) 4 months ago
socks5 all: rename variables with lowercase-l/uppercase-I 3 weeks ago
sockstats net/netmon: remove ChangeDelta.Major and start the TODOs 1 day ago
speedtest all: rename variables with lowercase-l/uppercase-I 3 weeks ago
stun ci: enable checklocks workflow for specific packages 1 year ago
stunserver all: use Go 1.22 range-over-int 2 years ago
tcpinfo all: use Go 1.22 range-over-int 2 years ago
tlsdial feature/featuretags, all: add build features, use existing ones in more places 2 months ago
tsaddr net/tsaddr: include test input in test failure output 1 year ago
tsdial types/netmap,*: remove some redundant fields from NetMap 3 weeks ago
tshttpproxy go.mod: bump golang.org/x/crypto (#17907) 3 weeks ago
tstun net/tstun: add TSMPDiscoAdvertisement to TSMPPing (#17995) 2 weeks ago
udprelay net/udprelay: bind multiple sockets per af on Linux 3 days ago
wsconn syncs: add Mutex/RWMutex alias/wrappers for future mutex debugging 3 weeks ago