diff options
| author | Anton <anton@picapica.im> | 2026-11-15 19:19:38 +0400 |
|---|---|---|
| committer | Anton <anton@picapica.im> | 2026-11-15 19:19:38 +0400 |
| commit | bd0bc3949a8fed3a2bd87b39cbeecd0b5cfcafd1 (patch) | |
| tree | 551e6200392d1c0bedc800d9248e12f440f4911e | |
| parent | 6d8ece9aa9a90937434ef2a4b6917a319a325d4e (diff) | |
| download | pica-pica-bd0bc3949a8fed3a2bd87b39cbeecd0b5cfcafd1.tar.gz pica-pica-bd0bc3949a8fed3a2bd87b39cbeecd0b5cfcafd1.zip | |
netconf: add carrier grade NAT range 100.64.0.0/10
| -rw-r--r-- | PICA_netconf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/PICA_netconf.c b/PICA_netconf.c index d319633..551c395 100644 --- a/PICA_netconf.c +++ b/PICA_netconf.c @@ -33,6 +33,7 @@ #define PREFIX4 htonl(0xf0000000U) #define PREFIX8 htonl(0xff000000U) +#define PREFIX10 htonl(0xffc00000U) #define PREFIX12 htonl(0xfff00000U) #define PREFIX16 htonl(0xffff0000U) #define PREFIX24 htonl(0xffffff00U) @@ -44,6 +45,7 @@ int PICA_is_reserved_addr_ipv4(in_addr_t addr) { if ((addr & PREFIX8) == 0 //0.0.0.0/8 || (addr & PREFIX8) == MAKEIP(10, 0, 0, 0) //10.0.0.0/8 + || (addr & PREFIX10) == MAKEIP(100, 64, 0, 0) //100.64.0.0/10 || (addr & PREFIX8) == MAKEIP(127, 0, 0, 0)//127.0.0.0/8 || (addr & PREFIX16) == MAKEIP(169, 254, 0, 0) //169.254.0.0/16 || (addr & PREFIX12) == MAKEIP(172, 16, 0, 0) //172.16.0.0/12 |
