control/controlclient,net/tstun,wgengine/magicsock: fix handling of zero keys in TSMP (#20508)

Updates tailscale/corp#45042

Signed-off-by: Claus Lensbøl <claus@tailscale.com>
This commit is contained in:
Claus Lensbøl
2026-07-17 14:02:53 -04:00
committed by GitHub
parent c1edf7f458
commit 82a381e54b
6 changed files with 121 additions and 49 deletions
+5
View File
@@ -200,6 +200,11 @@ func (ms *mapSession) Close() {
var ErrChangeQueueClosed = errors.New("change queue closed")
func (ms *mapSession) updateDiscoForNode(id tailcfg.NodeID, key key.NodePublic, discoKey key.DiscoPublic, lastSeen time.Time, online bool) error {
if discoKey.IsZero() {
ms.logf("[v1] controlclient: received zero disco key update from nodeID %v", id)
return nil
}
ms.cqmu.Lock()
if ms.changeQueueClosed {