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/controlclient
Avery Pennarun a8766815a4 ipn: cc.Login(noninteractive) at start even if WantRunning=false.
We were not properly initializing controlclient at startup, if
Prefs.WantRunning was initially false. This originally would cause the
state machine to get stuck in NewState, but an earlier erroneous change
tried to make it get stuck in NeedsLogin instead, which is incorrect;
NeedsLogin means we need *interactive* login, which is not true. The
correct fix is to not get it stuck.

While we're here:
- Add a bunch of comments to explain how these work.
- Unexport the Status.state var from controlclient. There has not been
  any need for outsiders to inspect it for a long time; it's needed
  only by unit tests.
- Remove a very suspicious check from AuthCantContinue that its self
  pointer != nil.
- Remove an extremely suspicious "defer b.stateMachine()" from Start().
  There is no need to run the state machine when nothing has happened
  yet; any apparent need for this is a sign of some other bug.

Fixes tailscale/corp#1660 (iOS app startup bug)

Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
4 years ago
..
auto.go ipn: cc.Login(noninteractive) at start even if WantRunning=false. 4 years ago
controlclient_test.go cover one more case in TestStatusEqual. 4 years ago
debug.go tailcfg, control/controlclient: add goroutine dump debug feature 4 years ago
debug_test.go tailcfg, control/controlclient: add goroutine dump debug feature 4 years ago
direct.go control/controlclient: fix signRegisterRequest log suppression check on Windows 4 years ago
direct_test.go control/controlclient: break direct.go into map.go (+tests), add mapSession 4 years ago
hostinfo_linux.go hostifo: update LXC, add Cloud Run. 4 years ago
hostinfo_windows.go control/controlclient: cache Windows version 4 years ago
map.go tailcfg, control/controlclient: accept nil MapResponse.Node (mapver 18) 4 years ago
map_test.go tailcfg, control/controlclient: accept nil MapResponse.Node (mapver 18) 4 years ago
sign.go control/controlclient: sign RegisterRequest (#1549) 4 years ago
sign_supported.go control/controlclient: return correct certificate 4 years ago
sign_unsupported.go control/controlclient: sign RegisterRequest (#1549) 4 years ago