mirror of
https://github.com/juanfont/headscale.git
synced 2026-07-17 13:30:49 +09:00
87c6d9b68e
SaaS accepts dst: ["100.64.0.16"] and dst: ["fd7a:115c:a1e0::10"] as host addresses but rejects dst: ["10.0.0.0/24"]. The earlier typed-Alias switch rejected every *Prefix and so dropped the bare-IP shape that the Prefix parser materialises as a /BitLen prefix. validateSSHTestDestination now distinguishes by *Prefix mask width: Bits() == Addr().BitLen() accepts (single host, equivalent to bare IP), anything narrower rejects with the existing ErrSSHTestDstDisallowedElement wording. The Host branch already used the same width check for hosts:-table aliases. Adds two captures for the new shapes (bare IPv4 / IPv6) and parse-time rows for the same in types_test. The IPv6 capture lands a SaaS-side engine asymmetry (parse-accept, engine-reject "test(s) failed" while the IPv4 mirror engine-passes) so it is parked in knownSSHTesterDivergences for a follow-up.