headscale/hscontrol/policy/v2
Kristoffer Dalby 95b1fd636e policy: fix wildcard DstPorts format and proto:icmp handling
Fix two compatibility issues discovered in Tailscale SaaS testing:

1. Wildcard DstPorts format: Headscale was expanding wildcard
   destinations to CGNAT ranges (100.64.0.0/10, fd7a:115c:a1e0::/48)
   while Tailscale uses {IP: "*"} directly. Add detection for
   wildcard (Asterix) alias type in filter compilation to use the
   correct format.

2. proto:icmp handling: The "icmp" protocol name was returning both
   ICMPv4 (1) and ICMPv6 (58), but Tailscale only returns ICMPv4.
   Users should use "ipv6-icmp" or protocol number 58 explicitly
   for IPv6 ICMP.

Update all test expectations accordingly. This significantly reduces
test file line count by replacing duplicated CGNAT range patterns
with single wildcard entries.
2026-02-05 19:29:16 +01:00
..
filter.go policy: fix wildcard DstPorts format and proto:icmp handling 2026-02-05 19:29:16 +01:00
filter_test.go policy: fix wildcard DstPorts format and proto:icmp handling 2026-02-05 19:29:16 +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
tailscale_compat_test.go policy: fix wildcard DstPorts format and proto:icmp handling 2026-02-05 19:29:16 +01:00
tailscale_routes_compat_test.go policy: fix wildcard DstPorts format and proto:icmp handling 2026-02-05 19:29:16 +01:00
types.go policy: fix wildcard DstPorts format and proto:icmp handling 2026-02-05 19:29:16 +01:00
types_test.go policy: use CGNAT/ULA ranges for wildcard resolution 2026-02-05 19:29:16 +01: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