mirror of
https://github.com/tailscale/tailscale.git
synced 2026-11-20 08:41:19 -08:00
When tailscaled learns that a peer restarted (its disco key changed), the peer has lost its WireGuard keys, but the kernel would keep sending with the dead session until WireGuard's own timers start a new handshake about 15 seconds later. Add TSWGPEER_A_CLEAR_SESSION, an NLA_FLAG in the nested WGPEER_A_TSWG attribute, which forgets the peer's keypairs and any handshake in progress, as wg_pm_notification does for every peer before suspend, and resets the handshake rate limit, so that the next packet to the peer is staged and starts a new handshake right away. Updates #426 Signed-off-by: Brad Fitzpatrick <[email protected]> Change-Id: Ia9821a47e6c8114bbabd81d8d5a2be528295e74f