mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-07-16 13:17:19 +02:00
eb8756bbe5
On networks using 464XLAT (common on IPv6-only cellular carriers and iPhone hotspots), the local machine's DNS queries can reach ctrld's listener with a source address in the RFC 7335 IPv4 Service Continuity Prefix (192.0.0.0/29, e.g. 192.0.0.2 on the CLAT/host side). isWanClient classified 192.0.0.x as a WAN client, so with allow_wan_clients unset (the default) the query was refused, breaking DNS resolution entirely on the affected connection even though it originated from the local host. Recognize the IPv4 Service Continuity Prefix as a local range, mirroring the existing CGNAT special case: - Add ipv4ServiceContinuityPrefix (192.0.0.0/29) and an isServiceContinuityAddr helper (single definition, reused by both call sites). - isWanClient excludes the range, so 464XLAT/CLAT queries are served normally. - isPrivatePtrLookup treats the range as private so reverse lookups are handled consistently. Scoped to 192.0.0.0/29 (the exact 464XLAT range); this does not weaken allow_wan_clients since no globally routable remote client can appear from it.