types/netmap: deprecate NetworkMap.MachineStatus, add accessor method

Step 1 of deleting it, per TODO.

Updates #cleanup

Change-Id: I1d3d0165ae5d8b20610227d60640997b73568733
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2023-09-13 10:20:51 -07:00
committed by Brad Fitzpatrick
parent 0f3c279b86
commit fb5ceb03e3
3 changed files with 25 additions and 5 deletions

View File

@@ -3812,7 +3812,7 @@ func (b *LocalBackend) nextStateLocked() ipn.State {
// NetMap must be non-nil for us to get here.
// The node key expired, need to relogin.
return ipn.NeedsLogin
case netMap.MachineStatus != tailcfg.MachineAuthorized:
case netMap.GetMachineStatus() != tailcfg.MachineAuthorized:
// TODO(crawshaw): handle tailcfg.MachineInvalid
return ipn.NeedsMachineAuth
case state == ipn.NeedsMachineAuth: