ipn/ipnlocal,wgengine/magicsock: wait for magicsock to process pending events on authReconfig

Updates #16369

Signed-off-by: Nick Khyl <nickk@tailscale.com>
This commit is contained in:
Nick Khyl
2025-06-24 13:39:29 -05:00
committed by Nick Khyl
parent 4a1fc378d1
commit 9e28bfc69c
4 changed files with 95 additions and 1 deletions
+5
View File
@@ -4853,6 +4853,11 @@ func (b *LocalBackend) readvertiseAppConnectorRoutes() {
// updates are not currently blocked, based on the cached netmap and
// user prefs.
func (b *LocalBackend) authReconfig() {
// Wait for magicsock to process pending [eventbus] events,
// such as netmap updates. This should be completed before
// wireguard-go is reconfigured. See tailscale/tailscale#16369.
b.MagicConn().Synchronize()
b.mu.Lock()
blocked := b.blocked
prefs := b.pm.CurrentPrefs()