mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Merge pull request #674 from FullName/RFC6598
Shared address space for stacking NAT (CGN) is LAN.
This commit is contained in:
commit
4207b73ca9
|
@ -176,6 +176,11 @@ int LAN_ip(IP ip)
|
||||||
&& ip4.uint8[2] != 255)
|
&& ip4.uint8[2] != 255)
|
||||||
return 0;
|
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) {
|
} else if (ip.family == AF_INET6) {
|
||||||
|
|
||||||
/* autogenerated for each interface: FE80::* (up to FEBF::*)
|
/* autogenerated for each interface: FE80::* (up to FEBF::*)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user