mirror of
https://github.com/juanfont/headscale.git
synced 2026-01-23 02:24:10 +00:00
When SetNodeTags changed a node's tags, the node's self view wasn't updated. The bug manifested as: the first SetNodeTags call updates the server but the client's self view doesn't update until a second call with the same tag. Root cause: Three issues combined to prevent self-updates: 1. SetNodeTags returned PolicyChange which doesn't set OriginNode, so the mapper's self-update check failed. 2. The Change.Merge function didn't preserve OriginNode, so when changes were batched together, OriginNode was lost. 3. generateMapResponse checked OriginNode only in buildFromChange(), but PolicyChange uses RequiresRuntimePeerComputation which bypasses that code path entirely and calls policyChangeResponse() instead. The fix addresses all three: - state.go: Set OriginNode on the returned change - change.go: Preserve OriginNode (and TargetNode) during merge - batcher.go: Pass isSelfUpdate to policyChangeResponse so the origin node gets both self info AND packet filters - mapper.go: Add includeSelf parameter to policyChangeResponse Fixes #2978 |
||
|---|---|---|
| .. | ||
| assets | ||
| capver | ||
| db | ||
| derp | ||
| dns | ||
| mapper | ||
| policy | ||
| routes | ||
| state | ||
| templates | ||
| types | ||
| util | ||
| app.go | ||
| auth.go | ||
| auth_tags_test.go | ||
| auth_test.go | ||
| debug.go | ||
| grpcv1.go | ||
| grpcv1_test.go | ||
| handlers.go | ||
| metrics.go | ||
| noise.go | ||
| oidc.go | ||
| oidc_template_test.go | ||
| oidc_test.go | ||
| platform_config.go | ||
| poll.go | ||
| suite_test.go | ||
| tailsql.go | ||
| templates_consistency_test.go | ||