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/monitor
Josh Bleecher Snyder ad5e04249b wgengine/monitor: ignore adding/removing uninteresting IPs
One of the most common "unexpected" log lines is:

"network state changed, but stringification didn't"

One way that this can occur is if an interesting interface
(non-Tailscale, has interesting IP address)
gains or loses an uninteresting IP address (link local or loopback).

The fact that the interface is interesting is enough for EqualFiltered
to inspect it. The fact that an IP address changed is enough for
EqualFiltered to declare that the interfaces are not equal.

But the State.String method reasonably declines to print any
uninteresting IP addresses. As a result, the network state appears
to have changed, but the stringification did not.

The String method is correct; nothing interesting happened.

This change fixes this by adding an IP address filter to EqualFiltered
in addition to the interface filter. This lets the network monitor
ignore the addition/removal of uninteresting IP addresses.

Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
3 years ago
..
monitor.go wgengine/monitor: ignore adding/removing uninteresting IPs 3 years ago
monitor_darwin.go wgengine/monitor: ignore ipsec link monitor events on iOS/macOS 3 years ago
monitor_darwin_test.go wgengine/monitor: add skipped failing test for Darwin route message bug 4 years ago
monitor_freebsd.go wgengine/monitor: on unsupported platforms, use a polling implementation 4 years ago
monitor_linux.go all: gofmt with Go 1.17 3 years ago
monitor_polling.go all: gofmt with Go 1.17 3 years ago
monitor_test.go wgengine{,/monitor}: restore Engine.LinkChange, add Mon.InjectEvent 4 years ago
monitor_windows.go wgengine/monitor: reduce Windows log spam 3 years ago
polling.go wgengine/monitor: ignore adding/removing uninteresting IPs 3 years ago