ipn/local: fix deadlock in initial suggested exit node query (#17025)

updates tailscale/corp#26369

b.mu is locked here.  We need to use suggestExitNodeLocked.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
This commit is contained in:
Jonathan Nobels 2025-09-03 15:35:05 -04:00 committed by GitHub
parent 2b9d055101
commit a2f2ac6ba1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3141,7 +3141,7 @@ func (b *LocalBackend) WatchNotificationsAs(ctx context.Context, actor ipnauth.A
ini.Health = b.HealthTracker().CurrentState() ini.Health = b.HealthTracker().CurrentState()
} }
if mask&ipn.NotifyInitialSuggestedExitNode != 0 { if mask&ipn.NotifyInitialSuggestedExitNode != 0 {
if en, err := b.SuggestExitNode(); err != nil { if en, err := b.suggestExitNodeLocked(); err == nil {
ini.SuggestedExitNode = &en.ID ini.SuggestedExitNode = &en.ID
} }
} }