ipn/ipnlocal: network-lock, error if no pubkey instead of panic

Updates tailscale/corp#20931

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
pull/13196/head
Kristoffer Dalby 5 months ago committed by Kristoffer Dalby
parent 9d2b1820f1
commit 01aa01f310

@ -255,7 +255,10 @@ func (b *LocalBackend) tkaSyncIfNeeded(nm *netmap.NetworkMap, prefs ipn.PrefsVie
b.logf("tkaSyncIfNeeded: enabled=%v, head=%v", nm.TKAEnabled, nm.TKAHead)
}
ourNodeKey := prefs.Persist().PublicNodeKey()
ourNodeKey, ok := prefs.Persist().PublicNodeKeyOK()
if !ok {
return errors.New("tkaSyncIfNeeded: no node key in prefs")
}
isEnabled := b.tka != nil
wantEnabled := nm.TKAEnabled

Loading…
Cancel
Save