diff --git a/CHANGELOG b/CHANGELOG index 6d4b292cd..525055ac7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,9 @@ # Nmap Changelog ($Id$); -*-text-*- +o Added another case to NmapOps::RawScan() to cover the case where we are using + a SYN ping scan and issuing raw packets. This fixes a bug wherein nmap would + not display the "Raw packets sent..." message [Josh Marlow] + o Changed the ICMP ping probes to use a random non-zero ICMP id. Some hosts seem to drop probes when ICMP id is 0 [Josh Marlow] diff --git a/NmapOps.cc b/NmapOps.cc index 59bff557b..78412ac49 100644 --- a/NmapOps.cc +++ b/NmapOps.cc @@ -321,15 +321,15 @@ bool NmapOps::UDPScan() { return udpscan; } - /* this function does not currently cover cases such as TCP SYN ping - scan which can go either way based on whether the user is root or - IPv6 is being used. It will return false in those cases where a - RawScan is not neccessarily used. */ bool NmapOps::RawScan() { if (ackscan|finscan|idlescan|ipprotscan|maimonscan|nullscan|osscan|synscan|udpscan|windowscan|xmasscan|sctpinitscan|sctpcookieechoscan) return true; if (pingtype & (PINGTYPE_ICMP_PING|PINGTYPE_ICMP_MASK|PINGTYPE_ICMP_TS|PINGTYPE_TCP_USE_ACK|PINGTYPE_UDP|PINGTYPE_SCTP_INIT)) return true; + /* A SYN scan will only generate raw packets if nmap is running as root and is + not issuing IPv6 packets. Otherwise, it becomes a connect scan. */ + if ((pingtype & PINGTYPE_TCP_USE_SYN) && (af() == AF_INET) && isr00t) + return true; return false; }