tailscale/wgengine
Brad Fitzpatrick fee74e7ea7 net/interfaces, wgengine/monitor: fix false positives link changes
interfaces.State.String tries to print a concise summary of the
network state, removing any interfaces that don't have any or any
interesting IP addresses. On macOS and iOS, for instance, there are a
ton of misc things.

But the link monitor based its are-there-changes decision on
interfaces.State.Equal, which just used reflect.DeepEqual, including
comparing all the boring interfaces. On macOS, when turning wifi on or off, there
are a ton of misc boring interface changes, resulting in hitting an earlier
check I'd added on suspicion this was happening:

    [unexpected] network state changed, but stringification didn't

This fixes that by instead adding a new
interfaces.State.RemoveUninterestingInterfacesAndAddresses method that
does, uh, that. Then use that in the monitor. So then when Equal is
used later, it's DeepEqualing the already-cleaned version with only
interesting interfaces.

This makes cmd/tailscaled debug --monitor much less noisy.

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-03-08 20:46:39 -08:00
..
filter wgengine/filter: use IPSet for localNets instead of prefixes. 2021-02-22 14:51:22 -08:00
magicsock wgengine/magicsock: fix typo in comment 2021-03-08 15:27:11 -08:00
monitor net/interfaces, wgengine/monitor: fix false positives link changes 2021-03-08 20:46:39 -08:00
netstack wgengine/netstack: stop UDP forwarding when one side dies 2021-03-08 13:59:37 -05:00
router wgengine/router: add OpenBSD IPv6 support. 2021-03-08 19:02:59 -08:00
tsdns wgengine/tsdns: explicitly reject .onion lookups 2021-03-01 22:17:49 -08:00
tstun wgengine/filter: use IPSet for localNets instead of prefixes. 2021-02-22 14:51:22 -08:00
wgcfg ipn/ipnlocal: only filter out default routes when computing the local wg config. 2021-02-24 20:41:56 -08:00
wglog wgengine/wglog: drop 1/s "interface is up" messages. 2021-02-23 09:01:58 -08:00
winnet wgengine/winnet: don't build on non-windows 2021-02-09 21:09:24 -08:00
ifstatus_noop.go wgengine: make NewUserspaceEngine wait for TUN interface to be up on Windows 2021-02-25 07:58:17 -08:00
ifstatus_windows.go wgengine: make NewUserspaceEngine wait for TUN interface to be up on Windows 2021-02-25 07:58:17 -08:00
pendopen.go ipn: split LocalBackend off into new ipn/ipnlocal package 2021-02-04 14:04:23 -08:00
userspace_test.go cmd/tailscaled, wgengine: remove --fake, replace with netstack 2021-03-01 11:09:19 -08:00
userspace.go wgengine{,/monitor}: restore Engine.LinkChange, add Mon.InjectEvent 2021-03-03 22:09:02 -08:00
watchdog_test.go cmd/tailscaled, wgengine: remove --fake, replace with netstack 2021-03-01 11:09:19 -08:00
watchdog.go wgengine{,/monitor}: restore Engine.LinkChange, add Mon.InjectEvent 2021-03-03 22:09:02 -08:00
wgengine.go wgengine{,/monitor}: restore Engine.LinkChange, add Mon.InjectEvent 2021-03-03 22:09:02 -08:00