mirror of
https://github.com/nmap/nmap.git
synced 2026-08-27 03:48:14 +00:00
Updating ip_is_reserved(): the last IPv4 address blocks (102-104/8, 179/8 and
185/8) have been allocated to the RIRs
This commit is contained in:
parent
cd9d6a9fc4
commit
740318cee9
2 changed files with 3 additions and 7 deletions
|
|
@ -416,17 +416,11 @@ int ip_is_reserved(struct in_addr *ip)
|
|||
case 10: /* the infamous 10.0.0.0/8 */
|
||||
case 55: /* misc. U.S.A. Armed forces */
|
||||
case 127: /* 127/8 is reserved for loopback */
|
||||
case 179: /* 179/8 is IANA reserved */
|
||||
case 185: /* 185/8 is IANA reserved */
|
||||
return 1;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* 102-104/8 is IANA reserved */
|
||||
if (i1 >= 102 && i1 <= 104)
|
||||
return 1;
|
||||
|
||||
/* 172.16.0.0/12 is reserved for private nets by RFC1819 */
|
||||
if (i1 == 172 && i2 >= 16 && i2 <= 31)
|
||||
return 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue