From c70b92b2a47f8440544921dfa7c94a8cd3b648b4 Mon Sep 17 00:00:00 2001 From: Rob Gill via Dnsmasq-discuss Date: Tue, 24 Jun 2025 22:16:04 +0000 Subject: [PATCH] Add CG-NAT range to non-globally routed IP space per RFC7793 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 --- src/rfc1035.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rfc1035.c b/src/rfc1035.c index 9cdc2a6..7f175ab 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) */ ||