ipn/ipnlocal: wait for DERP before auto exit node migration

Updates tailscale/corp#19681

Change-Id: I31dec154aa3b5edba01f10eec37640f631729cb2
Signed-off-by: Adrian Dewhurst <adrian@tailscale.com>
This commit is contained in:
Adrian Dewhurst 2024-07-15 10:30:14 -04:00 committed by Adrian Dewhurst
parent 35d2efd692
commit 8882c6b730
1 changed files with 5 additions and 2 deletions

View File

@ -4882,8 +4882,11 @@ func (b *LocalBackend) Logout(ctx context.Context) error {
func (b *LocalBackend) setNetInfo(ni *tailcfg.NetInfo) {
b.mu.Lock()
cc := b.cc
refresh := b.refreshAutoExitNode
b.refreshAutoExitNode = false
var refresh bool
if b.MagicConn().DERPs() > 0 || testenv.InTest() {
refresh = b.refreshAutoExitNode
b.refreshAutoExitNode = false
}
b.mu.Unlock()
if cc == nil {