headscale/hscontrol/policy
Kristoffer Dalby bceac495f9 policy: add NodeNeedsPeerRecompute predicate
Reports whether a node's online/offline transition forces peers to recompute their netmap. True for subnet routers, relay targets (tailscale.com/cap/relay), and via targets; false otherwise.

The relay-target IP set and via-target tag set are precompiled from the grants in updateLocked, alongside the existing filter, so the per-node check is a cheap set lookup. Keyed on the node itself, so an ordinary node in a tailnet that uses relay or via for other nodes is still classified as not needing a recompute.

Updates #3293
2026-06-03 14:51:57 +02:00
..
matcher all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
policyutil all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
v2 policy: add NodeNeedsPeerRecompute predicate 2026-06-03 14:51:57 +02:00
pm.go policy: add NodeNeedsPeerRecompute predicate 2026-06-03 14:51:57 +02:00
policy.go all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
policy_autoapprove_test.go policy/v2: refactor alias resolution to use ResolvedAddresses 2026-04-01 14:10:42 +01:00
policy_route_approval_test.go all: apply golangci-lint 2.9.0 fixes 2026-02-19 08:21:23 +01:00
policy_test.go policy/v2: align SSH rule validation with Tailscale 2026-05-13 21:10:13 +02:00
route_approval_test.go all: upgrade to Go 1.26rc2 and modernize codebase 2026-02-08 12:35:23 +01:00