From c764fc16beb8376912bd9a67f3687d6acfd345d9 Mon Sep 17 00:00:00 2001 From: "Coren[m]" Date: Thu, 5 Dec 2013 20:46:50 +0100 Subject: [PATCH] Shared address space for stacking NAT (CGN) is, just like 'regular' private address space, LAN. --- toxcore/LAN_discovery.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/toxcore/LAN_discovery.c b/toxcore/LAN_discovery.c index 0f237cca..eadec9ec 100644 --- a/toxcore/LAN_discovery.c +++ b/toxcore/LAN_discovery.c @@ -176,6 +176,11 @@ int LAN_ip(IP ip) && ip4.uint8[2] != 255) return 0; + /* RFC 6598: 100.64.0.0 to 100.127.255.255 (100.64.0.0/10) + * (shared address space to stack another layer of NAT) */ + if ((ip4.uint8[0] == 100) && ((ip4.uint8[1] & 0xC0) == 0x40)) + return 0; + } else if (ip.family == AF_INET6) { /* autogenerated for each interface: FE80::* (up to FEBF::*)