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
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>
5 years ago
..
filter wgengine/filter: use IPSet for localNets instead of prefixes. 5 years ago
magicsock wgengine/magicsock: fix typo in comment 5 years ago
monitor net/interfaces, wgengine/monitor: fix false positives link changes 5 years ago
netstack wgengine/netstack: stop UDP forwarding when one side dies 5 years ago
router wgengine/router: add OpenBSD IPv6 support. 5 years ago
tsdns wgengine/tsdns: explicitly reject .onion lookups 5 years ago
tstun wgengine/filter: use IPSet for localNets instead of prefixes. 5 years ago
wgcfg ipn/ipnlocal: only filter out default routes when computing the local wg config. 5 years ago
wglog wgengine/wglog: drop 1/s "interface is up" messages. 5 years ago
winnet wgengine/winnet: don't build on non-windows 5 years ago
ifstatus_noop.go wgengine: make NewUserspaceEngine wait for TUN interface to be up on Windows 5 years ago
ifstatus_windows.go wgengine: make NewUserspaceEngine wait for TUN interface to be up on Windows 5 years ago
pendopen.go ipn: split LocalBackend off into new ipn/ipnlocal package 5 years ago
userspace.go wgengine{,/monitor}: restore Engine.LinkChange, add Mon.InjectEvent 5 years ago
userspace_test.go cmd/tailscaled, wgengine: remove --fake, replace with netstack 5 years ago
watchdog.go wgengine{,/monitor}: restore Engine.LinkChange, add Mon.InjectEvent 5 years ago
watchdog_test.go cmd/tailscaled, wgengine: remove --fake, replace with netstack 5 years ago
wgengine.go wgengine{,/monitor}: restore Engine.LinkChange, add Mon.InjectEvent 5 years ago