You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/control
James Tucker a96ef432cf control/controlclient,ipn/ipnlocal: replace State enum with boolean flags
Remove the State enum (StateNew, StateNotAuthenticated, etc.) from
controlclient and replace it with two explicit boolean fields:
- LoginFinished: indicates successful authentication
- Synced: indicates we've received at least one netmap

This makes the state more composable and easier to reason about, as
multiple conditions can be true independently rather than being
encoded in a single enum value.

The State enum was originally intended as the state machine for the
whole client, but that abstraction moved to ipn.Backend long ago.
This change continues moving away from the legacy state machine by
representing state as a combination of independent facts.

Also adds test helpers in ipnlocal that check independent, observable
facts (hasValidNetMap, needsLogin, etc.) rather than relying on
derived state enums, making tests more robust.

Updates #12639

Signed-off-by: James Tucker <james@tailscale.com>
3 weeks ago
..
controlbase all: add Node.HomeDERP int, phase out "127.3.3.40:$region" hack [capver 111] 11 months ago
controlclient control/controlclient,ipn/ipnlocal: replace State enum with boolean flags 3 weeks ago
controlhttp feature/ace: make ACE modular 2 months ago
controlknobs control, ipn, tailcfg: enable seamless key renewal by default 3 months ago
ts2021 control/ts2021: fix data race during concurrent Close and conn ending 2 months ago