From 3348faca3add70ffea6d7e610d2dfb1930bc0c4f Mon Sep 17 00:00:00 2001 From: kris Date: Mon, 2 Feb 2009 18:02:41 +0000 Subject: [PATCH] update ip_is_reserved(): 109/8 and 178/8 allocated --- CHANGELOG | 3 +++ nmap.cc | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 04f640860..9b23595f2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,6 +8,9 @@ o The conditions for printing OS fingerprints to XML output are now o Fix Ncat compilation with the MingW windows compiler. [Gisle Vanem] +o Updated IANA assignment IP list for random IP (-iR) + generation. [Kris] + Nmap 4.85BETA2 [2009-1-29] o Added some duplicate GTK DLLs to Windows installer, as a temporary diff --git a/nmap.cc b/nmap.cc index eddb78b1b..c0f216881 100644 --- a/nmap.cc +++ b/nmap.cc @@ -373,7 +373,6 @@ static int ip_is_reserved(struct in_addr *ip) case 49: /* 049/8 is IANA reserved */ case 50: /* 050/8 is IANA reserved */ case 55: /* misc. U.S.A. Armed forces */ - case 109: /* 109/8 is IANA reserved */ case 127: /* 127/8 is reserved for loopback */ case 185: /* 185/8 is IANA reserved */ case 223: /* 223/8 is IANA reserved */ @@ -390,8 +389,12 @@ static int ip_is_reserved(struct in_addr *ip) if (i1 == 172 && i2 >= 16 && i2 <= 31) return 1; - /* 175-183/8 is IANA reserved */ - if (i1 >= 175 && i1 <= 183) + /* 175-177/8 is IANA reserved */ + if (i1 >= 175 && i1 <= 177) + return 1; + + /* 179-183/8 is IANA reserved */ + if (i1 >= 179 && i1 <= 183) return 1; /* 192.168.0.0/16 is reserved for private nets by RFC1819 */