headscale/hscontrol/policy/v2
Kristoffer Dalby 362696a5ef policy/v2: keep partial IPSet on SSH destination resolution errors
In compileSSHPolicy, when resolving other (non-autogroup:self)
destinations, the code discards the entire result on error via
`continue`. If a destination alias (e.g., a tag owned by a group
with a non-existent user) returns a partial IPSet alongside an
error, valid IPs are lost.

Both ACL compilation paths (compileFilterRules and
compileACLWithAutogroupSelf) already handle this correctly by
logging the error and using the IPSet if non-nil.

Remove the `continue` so the SSH path is consistent with the
ACL paths.

Fixes #2990
2026-02-03 16:53:15 +01:00
..
filter.go policy/v2: keep partial IPSet on SSH destination resolution errors 2026-02-03 16:53:15 +01:00
filter_test.go policy/v2: use partial IPSet on group resolution errors in autogroup:self path 2026-02-03 16:53:15 +01:00
policy.go policy/v2: add IsTagged() guards to prevent panics on tagged nodes 2026-02-03 16:53:15 +01:00
policy_test.go policy/v2: add test for issue #2990 same-user tagged device 2026-02-03 16:53:15 +01:00
types.go policy/v2: validate SSH source/destination combinations 2026-01-21 17:01:30 +00:00
types_test.go policy: update tests for SSH validation rules 2026-01-21 17:01:30 +00:00
utils.go modernize: run gopls modernize to bring up to 1.25 (#2920) 2025-12-01 19:40:25 +01:00
utils_test.go integration: replace time.Sleep with assert.EventuallyWithT (#2680) 2025-07-10 23:38:55 +02:00