mirror of
https://github.com/tailscale/tailscale.git
synced 2026-11-25 19:21:18 -08:00
When the netmap's SelfNode carries a BlueprintConfig with non-empty Routes, treat those routes as the source of truth for the local Prefs.AdvertiseRoutes. tailscale set --advertise-routes is already rejected for blueprint-bound nodes (see cmd/tailscale/cli/blueprint_lock.go) so the prefs slot is effectively under the blueprint's control; rewriting it from the netmap is the right thing to do. Reconciliation runs at the tail of setNetMapLocked. When it spots a delta, it persists the new prefs via b.pm.SetPrefs, refreshes b.hostinfo through the existing applyPrefsToHostinfoLocked path, and pushes the new Hostinfo to controlclient via doSetHostinfoFilterServices. The result is that the admin Machines page sees the freshly-advertised subnets within one map-poll of an ACL save touching the blueprint's serves.ipsets -- no leave/rejoin required. Updates #cleanup Signed-off-by: Kabir Sikand <[email protected]>