tailscale/net/interfaces
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
..
interfaces_darwin_cgo_test.go net/interfaces: use syscalls to find private gateway IP address 2020-08-04 15:45:56 -07:00
interfaces_darwin_cgo.go net/interfaces: log why when we failed to look up gateway on macOS 2021-03-05 09:44:55 -08:00
interfaces_darwin_nocgo.go net/interfaces: use syscalls to find private gateway IP address 2020-08-04 15:45:56 -07:00
interfaces_darwin.go net/interfaces: merge darwin files for DefaultRouteInterface in sandbox 2021-03-02 21:15:25 -08:00
interfaces_default_route_test.go net/{interfaces,netns}: add some new tests, missed from prior commit 2021-02-14 21:18:27 -08:00
interfaces_defaultrouteif_todo.go net/interfaces: merge darwin files for DefaultRouteInterface in sandbox 2021-03-02 21:15:25 -08:00
interfaces_linux_test.go net/netns, net/interfaces: move defaultRouteInterface, add Android fallback 2020-08-10 13:02:47 -07:00
interfaces_linux.go net/netns, net/interfaces: move defaultRouteInterface, add Android fallback 2020-08-10 13:02:47 -07:00
interfaces_test.go net/interfaces: remove IsTailscaleIP, make callers use tsaddr. 2021-01-26 15:10:51 -08:00
interfaces_windows_test.go net/interfaces: quiet PAC detection logging in no-PAC case, add benchmark 2020-10-01 22:02:39 -07:00
interfaces_windows.go net/interfaces: ignore bogus proxy URLs from winhttp [windows] 2020-11-10 11:30:18 -08:00
interfaces.go net/interfaces, wgengine/monitor: fix false positives link changes 2021-03-08 20:46:39 -08:00
route.h net/interfaces: use syscalls to find private gateway IP address 2020-08-04 15:45:56 -07:00