From 70bdc772897ac71439bfd3e5fbf5d3688a63b98d Mon Sep 17 00:00:00 2001 From: fyodor Date: Sun, 31 Dec 2006 08:52:07 +0000 Subject: [PATCH] some bugfixes from Eddie Bell related to build_icmp_raw ttl argument and nmap_getprotobyname calling nmap_protocols_init --- CHANGELOG | 3 +++ protocols.cc | 6 +----- tcpip.cc | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index f7a5c73a6..a669b9157 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,5 @@ # Nmap Changelog ($Id$); -*-text-*- + 4.21ALPHA2 o Nmap now has a public Subversion (SVN) source code repository. See @@ -12,6 +13,8 @@ o Update IANA assignment IP list for random IP (-iR) generation. o Applied more code cleanup patches from Kris Katterjohn. +o Applied some internal bugfix patches from Eddie Bell. + 4.21ALPHA1 o Integrated the Nmap Scripting Engine (NSE) into mainline Nmap. diff --git a/protocols.cc b/protocols.cc index e102914b3..28d5f82eb 100644 --- a/protocols.cc +++ b/protocols.cc @@ -180,11 +180,7 @@ static int nmap_protocols_init() { struct protoent *nmap_getprotbynum(int num) { struct protocol_list *current; - - // nmap_protocols_init never returns -1 ?! - //if (nmap_protocols_init() == -1) - // return NULL; - + nmap_protocols_init(); for(current = protocol_table[num % PROTOCOL_TABLE_SIZE]; current; current = current->next) { if (num == current->protoent->p_proto) diff --git a/tcpip.cc b/tcpip.cc index 1329d0121..2febbdc30 100644 --- a/tcpip.cc +++ b/tcpip.cc @@ -1441,7 +1441,7 @@ if ( o.badsum ) return build_ip_raw(source, victim, IPPROTO_ICMP, - o.ttl, get_random_u16(), tos, df, + ttl, get_random_u16(), tos, df, ipopt, ipoptlen, ping, icmplen, packetlen);