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/ipn
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
..
ipnlocal ipn: cc.Login(noninteractive) at start even if WantRunning=false. 4 years ago
ipnserver cmd/tailscaled: don't block ipnserver startup behind engine init on Windows 4 years ago
ipnstate ipn/ipnlocal, etc: require file sharing capability to send/recv files 4 years ago
localapi ipn/ipnlocal, etc: require file sharing capability to send/recv files 4 years ago
policy ipn/policy: mark peerapi4 and peerapi6 as interesting services 4 years ago
backend.go ipn: cc.Login(noninteractive) at start even if WantRunning=false. 4 years ago
doc.go Move Linux client & common packages into a public repo. 5 years ago
fake_test.go ipn{,/ipnlocal}, cmd/tailscale/cli: don't check pref reverts on initial up 4 years ago
handle.go ipn{,/ipnlocal}, cmd/tailscale/cli: don't check pref reverts on initial up 4 years ago
message.go ipn: define NewBackendServer nil as not affecting Backend's NotifyCallback 4 years ago
message_test.go ipn: define NewBackendServer nil as not affecting Backend's NotifyCallback 4 years ago
prefs.go ipn, cmd/tailscale/cli: add pref to configure sudo-free operator user 4 years ago
prefs_clone.go ipn, cmd/tailscale/cli: add pref to configure sudo-free operator user 4 years ago
prefs_test.go ipn, cmd/tailscale/cli: add pref to configure sudo-free operator user 4 years ago
store.go wgkey: new package 4 years ago
store_test.go Add tstest.PanicOnLog(), and fix various problems detected by this. 5 years ago