mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-25 19:15:34 +00:00
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)
|
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
|
isEnabled := b.tka != nil
|
||||||
wantEnabled := nm.TKAEnabled
|
wantEnabled := nm.TKAEnabled
|
||||||
|
Loading…
Reference in New Issue
Block a user