Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions net/netmon/netmon_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,18 @@ func (m *darwinRouteMon) skipInterfaceAddrMessage(msg *route.InterfaceAddrMessag
}

func (m *darwinRouteMon) skipRouteMessage(msg *route.RouteMessage) bool {
// RTM_MISS fires on every failed route lookup (no matching
// entry in the routing table). It scales with traffic volume,
// not network-state changes, and is never the leading signal
// for a topology change — route withdrawals emit RTM_DELETE
// synchronously before any subsequent lookup can miss.
// Letting these through causes netmon to report spurious
// LinkChange events, which trigger a ReSTUN/netcheck loop
// when the destination is unreachable (e.g. STUN probes to
// an IPv6 address with no route).
if msg.Type == unix.RTM_MISS {
return true
}
if ip := ipOfAddr(addrType(msg.Addrs, unix.RTAX_DST)); ip.IsLinkLocalUnicast() {
// Skip those like:
// dst = fe80::b476:66ff:fe30:c8f6%15
Expand Down
Loading