mirror of
https://github.com/tailscale/tailscale.git
synced 2026-11-20 08:41:19 -08:00
tailscaled was dumping the device every second to notice new sessions (to send its disco key advertisement, as wireguard-go does) and traffic on direct paths (to keep magicsock heartbeating active sessions). Instead, multicast TSWG_CMD_PEER_EVENT messages on a new "events" genetlink group, in the device's network namespace: one when a new session is established (from wg_timers_session_derived), and TX and RX activity notices, each rate limited to one per peer every 2 seconds with a single comparison on the packet path. Messages are only built when someone is listening. Updates #426 Signed-off-by: Brad Fitzpatrick <[email protected]> Change-Id: I08bdaa23a9f9b01a0bb3a4404296cae5961cde86