summaryrefslogtreecommitdiffhomepage
path: root/ssh/tailssh
diff options
context:
space:
mode:
authorAvery Pennarun <apenwarr@tailscale.com>2026-04-11 21:06:46 +0200
committerAvery Pennarun <apenwarr@tailscale.com>2026-04-11 21:21:11 +0200
commit66918a65f6413da987064e3abb794bce9f5942db (patch)
treea87ff5c8aecc3202a5395b6cbf55774c9e07ca6e /ssh/tailssh
parent03c3551ee50921cd4dba46e8fe08a6a49b0e9920 (diff)
downloadtailscale-apenwarr/key-extend.tar.xz
tailscale-apenwarr/key-extend.zip
control/controlclient: continue map poll during key expiry to receive extensionsapenwarr/key-extend
When a client's node key expires and the user clicks "Login" (or runs `tailscale up`), the Login() method was cancelling the map poll context. This caused key extension notifications from the server to be lost, leaving clients stuck in NeedsLogin state even after an admin extended their key. The fix has three parts: 1. Login(): Don't cancel mapCtx if we have valid credentials (loggedIn=true) or a valid node key. This allows the map poll to continue receiving server notifications while the auth flow proceeds in parallel. 2. mapRoutine(): Poll when we have a node key, even if !loggedIn. This handles the tsnet restart scenario where control returns an AuthURL (so loggedIn=false) but we still have a valid node key that can receive map updates. 3. sendStatus()/UpdateFullNetmap(): Forward netmaps when we have a node key, not just when loggedIn. This ensures the backend sees key expiry changes even when the auth flow hasn't completed. "First successful flow wins": if a key extension arrives via map poll, the client recovers automatically. If the auth flow completes first, that works too. Either way, the client is no longer stuck. This aligns with the SeamlessKeyRenewal philosophy: maintain connectivity paths while authentication proceeds, allowing server-initiated recovery. Fixes #19326 Change-Id: I26dbbc1fa7c1159ba075362e44d02814355d6b44 Signed-off-by: Avery Pennarun <apenwarr@tailscale.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'ssh/tailssh')
0 files changed, 0 insertions, 0 deletions