if (flags & FILTER_FLAG_NO_PRIV_RANGE) {
if (
(ip[0] == 10) ||
- (ip[0] == 169 && ip[1] == 254) ||
- (ip[0] == 172 && (ip[1] >= 16 && ip[1] <= 31)) ||
+ (ip[0] == 172 && ip[1] >= 16 && ip[1] <= 31) ||
(ip[0] == 192 && ip[1] == 168)
) {
RETURN_VALIDATION_FAILED
if (flags & FILTER_FLAG_NO_RES_RANGE) {
if (
(ip[0] == 0) ||
- (ip[0] == 10) ||
- (ip[0] == 100 && (ip[1] >= 64 && ip[1] <= 127)) ||
+ (ip[0] >= 240) ||
(ip[0] == 127) ||
- (ip[0] == 169 && ip[1] == 254) ||
- (ip[0] == 172 && (ip[1] >= 16 && ip[1] <= 31)) ||
- (ip[0] == 192 && ip[1] == 0 && ip[2] == 0) ||
- (ip[0] == 192 && ip[1] == 0 && ip[2] == 2) ||
- (ip[0] == 192 && ip[1] == 88 && ip[2] == 99) ||
- (ip[0] == 192 && ip[1] == 168) ||
- (ip[0] == 198 && (ip[1] == 18 || ip[1] == 19)) ||
- (ip[0] == 198 && ip[1] == 51 && ip[2] == 100) ||
- (ip[0] == 203 && ip[1] == 0 && ip[2] == 113) ||
- (ip[0] >= 224 && ip[0] <= 255)
+ (ip[0] == 169 && ip[1] == 254)
) {
RETURN_VALIDATION_FAILED
}
bool(false)
bool(false)
string(14) "168.254.0.0/16"
-bool(false)
-bool(false)
+string(11) "169.254.0.0"
+string(15) "169.254.255.255"
string(13) "172.16.0.0/12"
bool(false)
bool(false)
bool(false)
bool(false)
string(10) "10.0.0.0/8"
-bool(false)
-bool(false)
+string(8) "10.0.0.0"
+string(14) "10.255.255.255"
string(12) "10.64.0.0/10"
-bool(false)
-bool(false)
+string(10) "100.64.0.0"
+string(15) "100.127.255.255"
string(11) "127.0.0.0/8"
bool(false)
bool(false)
bool(false)
bool(false)
string(13) "172.16.0.0/12"
-bool(false)
-bool(false)
+string(10) "172.16.0.0"
+string(10) "172.31.0.0"
string(12) "192.0.0.0/24"
-bool(false)
-bool(false)
+string(9) "192.0.0.0"
+string(11) "192.0.0.255"
string(12) "192.0.0.0/29"
-bool(false)
-bool(false)
+string(9) "192.0.0.0"
+string(9) "192.0.0.7"
string(12) "192.0.2.0/24"
-bool(false)
-bool(false)
+string(9) "192.0.2.0"
+string(11) "192.0.2.255"
string(13) "198.18.0.0/15"
-bool(false)
-bool(false)
+string(10) "198.18.0.0"
+string(14) "198.19.255.255"
string(15) "198.51.100.0/24"
-bool(false)
-bool(false)
+string(12) "198.51.100.0"
+string(14) "198.51.100.255"
string(14) "192.88.99.0/24"
-bool(false)
-bool(false)
+string(11) "192.88.99.0"
+string(13) "192.88.99.255"
string(14) "192.168.0.0/16"
-bool(false)
-bool(false)
+string(11) "192.168.0.0"
+string(15) "192.168.255.255"
string(14) "203.0.113.0/24"
-bool(false)
-bool(false)
+string(11) "203.0.113.0"
+string(13) "203.0.113.255"
string(11) "240.0.0.0/4"
-bool(false)
+string(9) "224.0.0.0"
bool(false)