ipn/ipnlocal: network-lock, error if no pubkey instead of panic
Updates tailscale/corp#20931 Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
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…
Reference in New Issue