diff --git a/ipn/ipnlocal/network-lock.go b/ipn/ipnlocal/network-lock.go index 932627c56..cbbff4f80 100644 --- a/ipn/ipnlocal/network-lock.go +++ b/ipn/ipnlocal/network-lock.go @@ -449,6 +449,8 @@ func (b *LocalBackend) NetworkLockStatus() *ipnstate.NetworkLockStatus { filtered[i] = b.tka.filtered[i].Clone() } + stateID1, _ := b.tka.authority.StateIDs() + return &ipnstate.NetworkLockStatus{ Enabled: true, Head: &head, @@ -457,6 +459,7 @@ func (b *LocalBackend) NetworkLockStatus() *ipnstate.NetworkLockStatus { NodeKeySigned: selfAuthorized, TrustedKeys: outKeys, FilteredPeers: filtered, + StateID: stateID1, } } diff --git a/ipn/ipnstate/ipnstate.go b/ipn/ipnstate/ipnstate.go index 94d91b180..97eb78032 100644 --- a/ipn/ipnstate/ipnstate.go +++ b/ipn/ipnstate/ipnstate.go @@ -121,6 +121,11 @@ type NetworkLockStatus struct { // (i.e. no connectivity) because they failed tailnet lock // checks. FilteredPeers []*TKAFilteredPeer + + // StateID is a nonce associated with the network lock authority, + // generated upon enablement. This field is not populated if the + // network lock is disabled. + StateID uint64 } // NetworkLockUpdate describes a change to network-lock state.