tailscale/wgengine/monitor
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
..
monitor_darwin_test.go wgengine/monitor: add skipped failing test for Darwin route message bug 2021-03-02 09:53:36 -08:00
monitor_darwin.go wgengine/monitor: on unsupported platforms, use a polling implementation 2021-03-02 21:49:27 -08:00
monitor_freebsd.go wgengine/monitor: on unsupported platforms, use a polling implementation 2021-03-02 21:49:27 -08:00
monitor_linux.go wgengine/monitor: on unsupported platforms, use a polling implementation 2021-03-02 21:49:27 -08:00
monitor_polling.go wgengine/monitor: on unsupported platforms, use a polling implementation 2021-03-02 21:49:27 -08:00
monitor_test.go wgengine{,/monitor}: restore Engine.LinkChange, add Mon.InjectEvent 2021-03-03 22:09:02 -08:00
monitor_windows.go wgengine/monitor: simplify the Windows monitor to make it more reliable 2021-03-08 14:54:57 -08:00
monitor.go net/interfaces, wgengine/monitor: fix false positives link changes 2021-03-08 20:46:39 -08:00