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
James Tucker f4aad61e67 wgengine/monitor: ignore duplicate RTM_NEWADDRs
Ignoring the events at this layer is the simpler path for right now, a
broader change should follow to suppress irrelevant change events in a
higher layer so as to avoid related problems with other monitoring paths
on other platforms.  This approach may also carry a small risk that it
applies an at-most-once invariant low in the chain that could be assumed
otherwise higher in the code.

I adjusted the newAddrMessage type to include interface index rather
than a label, as labels are not always supplied, and in particular on my
test hosts they were consistently missing for ipv6 address messages.

I adjusted the newAddrMessage.Addr field to be populated from
Attributes.Address rather than Attributes.Local, as again for ipv6
.Local was always empty, and with ipv4 the .Address and .Local contained
the same contents in each of my test environments.

Update #4282

Signed-off-by: James Tucker <james@tailscale.com>
3 years ago
..
monitor.go all: use any instead of interface{} 3 years ago
monitor_darwin.go all: use any instead of interface{} 3 years ago
monitor_darwin_test.go wgengine/monitor: add skipped failing test for Darwin route message bug 4 years ago
monitor_freebsd.go support running in a FreeBSD jail 3 years ago
monitor_linux.go wgengine/monitor: ignore duplicate RTM_NEWADDRs 3 years ago
monitor_linux_test.go wgengine/monitor: ignore duplicate RTM_NEWADDRs 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 support running in a FreeBSD jail 3 years ago