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/net/interfaces
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
..
interfaces.go wgengine/monitor: ignore adding/removing uninteresting IPs 3 years ago
interfaces_darwin.go net/interface: remove darwin fetchRoutingTable workaround 3 years ago
interfaces_darwin_test.go net/{dnscache,interfaces}: use netaddr.IP.IsPrivate, delete copied code 3 years ago
interfaces_default_route_test.go all: gofmt with Go 1.17 3 years ago
interfaces_defaultrouteif_todo.go all: gofmt with Go 1.17 3 years ago
interfaces_linux.go net/{dnscache,interfaces}: use netaddr.IP.IsPrivate, delete copied code 3 years ago
interfaces_linux_test.go net/interface: add AWS App Runner /proc/net/route test 3 years ago
interfaces_test.go wgengine/monitor: ignore adding/removing uninteresting IPs 3 years ago
interfaces_windows.go net/interfaces/windows: update Tailscale interface detection logic to 3 years ago
interfaces_windows_test.go net/interfaces: quiet PAC detection logging in no-PAC case, add benchmark 4 years ago