diff options
| author | Nick Khyl <nickk@tailscale.com> | 2025-01-31 18:27:37 -0600 |
|---|---|---|
| committer | Nick Khyl <1761190+nickkhyl@users.noreply.github.com> | 2025-01-31 18:41:02 -0600 |
| commit | a0537dc0270505bf34736c5bd8595b9770111e1a (patch) | |
| tree | e70853562d7f43809f779d0e02a54dd5d913181f /control/controlhttp/controlhttpserver/controlhttpserver.go | |
| parent | 2e95313b8bb08e4dca1c0a27854fb3d65d40194f (diff) | |
| download | tailscale-a0537dc0270505bf34736c5bd8595b9770111e1a.tar.xz tailscale-a0537dc0270505bf34736c5bd8595b9770111e1a.zip | |
ipn/ipnlocal: fix a panic in setPrefsLockedOnEntry when cc is nil
The AlwaysOn policy can be applied by (*LocalBackend).applySysPolicy, flipping WantRunning from false to true
before (*LocalBackend).Start() has been called for the first time and set a control client in b.cc. This results in a nil
pointer dereference and a panic when setPrefsLockedOnEntry applies the change and calls controlclient.Client.Login().
In this PR, we fix it by only doing a login if b.cc has been set.
Updates #14823
Signed-off-by: Nick Khyl <nickk@tailscale.com>
Diffstat (limited to 'control/controlhttp/controlhttpserver/controlhttpserver.go')
0 files changed, 0 insertions, 0 deletions
