mirror of
https://github.com/nmap/nmap.git
synced 2026-01-18 20:29:02 +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:
@@ -32,7 +32,9 @@ o [Ndiff] Fixed an output line that wasn't being redirected to a file
|
||||
when all other output was. [Daniel Miller]
|
||||
|
||||
o Updated IANA IP address space assignment list for random IP (-iR)
|
||||
generation. [Kris]
|
||||
generation. This list now contains only various reserved blocks as
|
||||
IANA has handed out the final unallocated IPv4 addresses to the
|
||||
RIRs. [Kris]
|
||||
|
||||
Nmap 5.50 [2011-01-28]
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user