summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@tailscale.com>2022-03-19 20:00:43 -0700
committerBrad Fitzpatrick <brad@danga.com>2022-03-19 20:24:33 -0700
commitbfb4a4d9e9b48acc3e9de8a3b2b67f1f31143b57 (patch)
treea433772aa0881e4ae2d651a2bc0a89de51b8b24e
parent19f61607b65087e41ec6bcd389792162c98f2334 (diff)
downloadtailscale-bfb4a4d9e9b48acc3e9de8a3b2b67f1f31143b57.tar.xz
tailscale-bfb4a4d9e9b48acc3e9de8a3b2b67f1f31143b57.zip
tsnet: fix format string/argument mismatch in log output
Change-Id: Ia7291ea47a289baec6cc6013d63d2f248ae57d9e Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
-rw-r--r--tsnet/tsnet.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/tsnet/tsnet.go b/tsnet/tsnet.go
index 390540428..47fa5f53d 100644
--- a/tsnet/tsnet.go
+++ b/tsnet/tsnet.go
@@ -239,11 +239,12 @@ func (s *Server) start() error {
if err != nil {
return fmt.Errorf("starting backend: %w", err)
}
- if lb.State() == ipn.NeedsLogin || envknob.Bool("TSNET_FORCE_LOGIN") {
- logf("LocalBackend state is %v; running StartLoginInteractive...")
+ st := lb.State()
+ if st == ipn.NeedsLogin || envknob.Bool("TSNET_FORCE_LOGIN") {
+ logf("LocalBackend state is %v; running StartLoginInteractive...", st)
s.lb.StartLoginInteractive()
} else if authKey != "" {
- logf("TS_AUTHKEY is set; but state is %v. Ignoring authkey. Re-run with TSNET_FORCE_LOGIN=1 to force use of authkey.")
+ logf("TS_AUTHKEY is set; but state is %v. Ignoring authkey. Re-run with TSNET_FORCE_LOGIN=1 to force use of authkey.", st)
}
go s.printAuthURLLoop()