mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-08 09:07:44 +00:00
tka: provide authority StateID in NetworkLockStatus response (#8200)
Fixes #8201. Signed-off-by: Andrea Gottardo <andrea@tailscale.com> Co-authored-by: Andrea Gottardo <andrea@tailscale.com>
This commit is contained in:
parent
e32e5c0d0c
commit
66f97f4bea
@ -449,6 +449,8 @@ func (b *LocalBackend) NetworkLockStatus() *ipnstate.NetworkLockStatus {
|
|||||||
filtered[i] = b.tka.filtered[i].Clone()
|
filtered[i] = b.tka.filtered[i].Clone()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stateID1, _ := b.tka.authority.StateIDs()
|
||||||
|
|
||||||
return &ipnstate.NetworkLockStatus{
|
return &ipnstate.NetworkLockStatus{
|
||||||
Enabled: true,
|
Enabled: true,
|
||||||
Head: &head,
|
Head: &head,
|
||||||
@ -457,6 +459,7 @@ func (b *LocalBackend) NetworkLockStatus() *ipnstate.NetworkLockStatus {
|
|||||||
NodeKeySigned: selfAuthorized,
|
NodeKeySigned: selfAuthorized,
|
||||||
TrustedKeys: outKeys,
|
TrustedKeys: outKeys,
|
||||||
FilteredPeers: filtered,
|
FilteredPeers: filtered,
|
||||||
|
StateID: stateID1,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,6 +121,11 @@ type NetworkLockStatus struct {
|
|||||||
// (i.e. no connectivity) because they failed tailnet lock
|
// (i.e. no connectivity) because they failed tailnet lock
|
||||||
// checks.
|
// checks.
|
||||||
FilteredPeers []*TKAFilteredPeer
|
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.
|
// NetworkLockUpdate describes a change to network-lock state.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user