[Dnsmasq-discuss] [PATCH] Add CG-NAT range to non-globally routed IP space per RFC7793
Simon Kelley
simon at thekelleys.org.uk
Thu Jun 26 12:22:12 UTC 2025
Patch applied.
Cheers,
Simon.
On 6/24/25 23:16, Rob Gill via Dnsmasq-discuss wrote:
> The Shared address space (100.64.0.0/10) used by CG-NAT, defined in RFC6598 should
> not have reverse DNS queries sent to global DNS infrastructure.
>
> Confirmed in RFC7793 and listed on
> https://www.iana.org/assignments/locally-served-dns-zones/locally-served-dns-zones.xhtml
>
> Signed-off-by: Rob Gill <rrobgill at protonmail.com>
> ---
> src/rfc1035.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/rfc1035.c b/src/rfc1035.c
> index bb63083..5f316d8 100644
> --- a/src/rfc1035.c
> +++ b/src/rfc1035.c
> @@ -415,6 +415,7 @@ int private_net(struct in_addr addr, int ban_localhost)
> (((ip_addr & 0xFF000000) == 0x7F000000) && ban_localhost) /* 127.0.0.0/8 (loopback) */ ||
> (((ip_addr & 0xFF000000) == 0x00000000) && ban_localhost) /* RFC 5735 section 3. "here" network */ ||
> ((ip_addr & 0xFF000000) == 0x0A000000) /* 10.0.0.0/8 (private) */ ||
> + ((ip_addr & 0xFFC00000) == 0x64400000) /* 100.64.0.0/10 (CG-NAT) RFC6598/RFC7793*/ ||
> ((ip_addr & 0xFFF00000) == 0xAC100000) /* 172.16.0.0/12 (private) */ ||
> ((ip_addr & 0xFFFF0000) == 0xC0A80000) /* 192.168.0.0/16 (private) */ ||
> ((ip_addr & 0xFFFF0000) == 0xA9FE0000) /* 169.254.0.0/16 (zeroconf) */ ||
More information about the Dnsmasq-discuss
mailing list