Files
headscale/hscontrol
Kristoffer Dalby 49744cd467 policy/v2: accept RFC 3986 bracketed IPv6 in ACL destinations
Headscale rejects IPv6 addresses with square brackets in ACL policy
destinations (e.g. "[fd7a:115c:a1e0::87e1]:80,443"), while Tailscale
SaaS accepts them. The root cause is that splitDestinationAndPort uses
strings.LastIndex(":") which leaves brackets on the destination string,
and netip.ParseAddr does not accept brackets.

Add a bracket-handling branch at the top of splitDestinationAndPort that
uses net.SplitHostPort for RFC 3986 parsing when input starts with "[".
The extracted host is validated with netip.ParseAddr/ParsePrefix to
ensure brackets are only accepted around IP addresses and CIDR prefixes,
not hostnames or other alias types like tags and groups.

Fixes #2754
2026-02-20 21:49:21 +01:00
..
2026-02-19 08:21:23 +01:00
2026-02-06 21:45:32 +01:00
2026-01-16 14:54:04 +01:00
2026-02-19 08:21:23 +01:00
2026-02-06 21:45:32 +01:00
2026-02-06 21:45:32 +01:00
2026-02-06 21:45:32 +01:00
2026-02-06 21:45:32 +01:00