diff --git a/ipn/ipnlocal/local.go b/ipn/ipnlocal/local.go index d783fa72f..5a6f6bc84 100644 --- a/ipn/ipnlocal/local.go +++ b/ipn/ipnlocal/local.go @@ -2436,9 +2436,12 @@ func (b *LocalBackend) popBrowserAuthNow() { b.authURL = "" // but NOT clearing authURLSticky b.mu.Unlock() - b.logf("popBrowserAuthNow: url=%v", url != "") + b.logf("popBrowserAuthNow: url=%v, key-expired=%v, seamless-key-renewal=%v", url != "", b.keyExpired, b.seamlessRenewalEnabled()) - if !b.seamlessRenewalEnabled() { + // Deconfigure the local network data plane if: + // - seamless key renewal is not enabled; + // - key is expired (in which case tailnet connectivity is down anyway). + if !b.seamlessRenewalEnabled() || b.keyExpired { b.blockEngineUpdates(true) b.stopEngineAndWait() }