From 92e08b2f09334fe66cf22389ad5c399c1169a2fe Mon Sep 17 00:00:00 2001 From: kris Date: Thu, 12 Apr 2007 16:53:06 +0000 Subject: [PATCH] Updating IANA IP list (ip_is_reserved()). 046/8 is back with IANA, and 092/8 and 093/8 were given to RIPE. With CHANGELOG entry. --- CHANGELOG | 2 ++ nmap.cc | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 942400dc8..a0a1a765f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,7 @@ # Nmap Changelog ($Id$); -*-text-*- +o Updated IANA assignment IP list for random IP (-iR) generation. [Kris] + 4.21ALPHA4 o Performed another big OS detection run. The DB has grown almost 10% diff --git a/nmap.cc b/nmap.cc index f22130493..712be1bbf 100644 --- a/nmap.cc +++ b/nmap.cc @@ -350,9 +350,12 @@ static int ip_is_reserved(struct in_addr *ip) case 37: /* 037/8 is IANA reserved */ case 39: /* 039/8 is IANA reserved */ case 42: /* 042/8 is IANA reserved */ + case 46: /* 046/8 is IANA reserved */ case 49: /* 049/8 is IANA reserved */ case 50: /* 050/8 is IANA reserved */ case 55: /* misc. U.S.A. Armed forces */ + case 94: /* 094/8 is IANA reserved */ + case 95: /* 095/8 is IANA reserved */ case 127: /* 127/8 is reserved for loopback */ case 197: /* 197/8 is IANA reserved */ case 223: /* 223/8 is IANA reserved */ @@ -361,10 +364,6 @@ static int ip_is_reserved(struct in_addr *ip) break; } - /* 092-95/8 is IANA reserved */ - if (i1 >= 92 && i1 <= 95) - return 1; - /* 100-115/8 is IANA reserved */ if (i1 >= 100 && i1 <= 115) return 1;