mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-12 05:37:32 +00:00
ipn/ipnlocal: ensure that hostinfo is updated on app connector preference changes
Some conditional paths may otherwise skip the hostinfo update, so kick it off asynchronously as other code paths do. Updates tailscale/corp#15437 Signed-off-by: James Tucker <james@tailscale.com>
This commit is contained in:

committed by
James Tucker

parent
933d201bba
commit
45be37cb01
@@ -3272,7 +3272,13 @@ func (b *LocalBackend) reconfigAppConnectorLocked(nm *netmap.NetworkMap, prefs i
|
||||
const appConnectorCapName = "tailscale.com/app-connectors"
|
||||
|
||||
if !prefs.AppConnector().Advertise {
|
||||
b.appConnector = nil
|
||||
var old *appc.AppConnector
|
||||
old, b.appConnector = b.appConnector, nil
|
||||
if old != nil {
|
||||
// Ensure that the app connector service will not be advertised now
|
||||
// that b.appConnector is no longer set.
|
||||
go b.doSetHostinfoFilterServices()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -3306,6 +3312,10 @@ func (b *LocalBackend) reconfigAppConnectorLocked(nm *netmap.NetworkMap, prefs i
|
||||
slices.Sort(domains)
|
||||
slices.Compact(domains)
|
||||
b.appConnector.UpdateDomains(domains)
|
||||
|
||||
// Ensure that the app connector service will be advertised now that
|
||||
// b.appConnector is set.
|
||||
go b.doSetHostinfoFilterServices()
|
||||
}
|
||||
|
||||
// authReconfig pushes a new configuration into wgengine, if engine
|
||||
|
Reference in New Issue
Block a user