summaryrefslogtreecommitdiffhomepage
path: root/control/controlclient/client.go
AgeCommit message (Collapse)AuthorFilesLines
2024-05-17control/controlclient: delete unused Client.Login Oauth2Token fieldBrad Fitzpatrick1-1/+1
Updates #12172 (then need to update other repos) Change-Id: I439f65e0119b09e00da2ef5c7a4f002f93558578 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2024-05-07ipn/ipnlocal: acquire b.mu once in StartMaisem Ali1-1/+2
We used to Lock, Unlock, Lock, Unlock quite a few times in Start resulting in all sorts of weird race conditions. Simplify it all and only Lock/Unlock once. Updates #11649 Signed-off-by: Maisem Ali <maisem@tailscale.com>
2023-09-29tsnet: add a test for restarting a tsnet server, fix WindowsBrad Fitzpatrick1-0/+8
Thanks to @qur and @eric for debugging! Fixes #6973 Change-Id: Ib2cf8f030cf595cc73dd061c72e78ac19f5fae5d Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2023-09-02ipn/ipnlocal: fix deadlock in resetControlClientLockedMaisem Ali1-0/+3
resetControlClientLocked is called while b.mu was held and would call cc.Shutdown which would wait for the observer queue to drain. However, there may be active callbacks from cc already waiting for b.mu resulting in a deadlock. This makes it so that resetControlClientLocked does not call Shutdown, and instead just returns the value. It also makes it so that any status received from previous cc are ignored. Updates tailscale/corp#12827 Signed-off-by: Maisem Ali <maisem@tailscale.com>
2023-08-30control/controlclient: remove unused StartLogoutBrad Fitzpatrick1-4/+0
Updates #cleanup Co-authored-by: Maisem Ali <maisem@tailscale.com> Change-Id: I9d052fdbee787f1e8c872124e4bee61c7f04d142 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2023-01-27all: update copyright and license headersWill Norris1-3/+2
This updates all source files to use a new standard header for copyright and license declaration. Notably, copyright no longer includes a date, and we now use the standard SPDX-License-Identifier header. This commit was done almost entirely mechanically with perl, and then some minimal manual fixes. Updates #6865 Signed-off-by: Will Norris <will@tailscale.com>
2022-10-31cmd,ipn/ipnlocal,tailcfg: implement TKA disablementTom DNetto1-0/+3
* Plumb disablement values through some of the internals of TKA enablement. * Transmit the node's TKA hash at the end of sync so the control plane understands each node's head. * Implement /machine/tka/disable RPC to actuate disablement on the control plane. There is a partner PR for the control server I'll send shortly. Signed-off-by: Tom DNetto <tom@tailscale.com>
2022-06-19control/controlclient, ipn/ipnlocal: remove Client.SetExpirySooner, fix raceBrad Fitzpatrick1-4/+0
Client.SetExpirySooner isn't part of the state machine. Remove it from the Client interface. And fix a use of LocalBackend.cc without acquiring the lock that guards that field. Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-06-19control/controlclient: remove Client.SetStatusFuncBrad Fitzpatrick1-3/+0
It can't change at runtime. Make it an option. Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-06-19control/controlclient, ipn/ipnlocal: remove some Client methodsBrad Fitzpatrick1-7/+0
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-06-19control/controlclient, types/netmap: remove unused LocalPort fieldBrad Fitzpatrick1-2/+1
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-03-10ssh/tailssh, ipnlocal, controlclient: fetch next SSHAction from networkBrad Fitzpatrick1-0/+4
Updates #3802 Change-Id: I08e98805ab86d6bbabb6c365ed4526f54742fd8e Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-03-09control/controlclient, localapi: shorten expiry time via localapi (#4112)Nick O'Neill1-0/+4
Signed-off-by: Nick O'Neill <nick@tailscale.com>
2021-11-03ipn/ipnlocal, control/controlclient: don't propagate all map errors to UIBrad Fitzpatrick1-0/+6
Fixes regression from 81cabf48ec1f0d306f7dcf0c8a58a6eae6594c76 which made all map errors be sent to the frontend UI. Fixes #3230 Change-Id: I7f142c801c7d15e268a24ddf901c3e6348b6729c Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-10-28control/controlclient: add a LoginEphemeral LoginFlags bitBrad Fitzpatrick1-0/+1
Change-Id: Ib9029ea0c49aa2ee1b6aac6e464ab1f16aef92e8 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-09-15control/controlclient: replace TODO with explanationJosh Bleecher Snyder1-1/+1
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2021-06-07ipn/{ipnlocal,localapi}, control/controlclient: add SetDNS localapiBrad Fitzpatrick1-0/+3
Updates #1235 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-04-30controlclient: extract a Client interface and rename Client->Auto.Avery Pennarun1-0/+77
This will let us create a mock or fake Client implementation for use with ipn.Backend. Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>