From 740318cee9cf7b6d873992c03396e1f3b28e0cb4 Mon Sep 17 00:00:00 2001 From: kris Date: Fri, 4 Feb 2011 03:06:57 +0000 Subject: [PATCH] Updating ip_is_reserved(): the last IPv4 address blocks (102-104/8, 179/8 and 185/8) have been allocated to the RIRs --- CHANGELOG | 4 +++- libnetutil/netutil.cc | 6 ------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 5f18baf9e..0f967a5ae 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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] diff --git a/libnetutil/netutil.cc b/libnetutil/netutil.cc index d7a4b1629..90f7bc5c6 100644 --- a/libnetutil/netutil.cc +++ b/libnetutil/netutil.cc @@ -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;