From 643d3eb9ffe429ba76d8f95368c8362819c547b6 Mon Sep 17 00:00:00 2001 From: kris Date: Wed, 28 Jul 2010 22:34:12 +0000 Subject: [PATCH] o Fixed the fragmentation options (-f, --mtu) which broke in 5.35DC1. Instead of sending multiple fragments, Nmap would just send the original whole packet instead. In some circumstances, Nmap would fail to send on interfaces with low MTUs (such as SLIP lines) with no way to bump down packet sizes for transport. [Kris] It looks like this has been broken in trunk since merging libnetutil, and since r18037 in the dedup branch. --- CHANGELOG | 6 ++++++ libnetutil/netutil.cc | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 4010e23d7..d6734db37 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,11 @@ # Nmap Changelog ($Id$); -*-text-*- +o Fixed the fragmentation options (-f, --mtu) which broke in 5.35DC1. + Instead of sending multiple fragments, Nmap would just send the + original whole packet instead. In some circumstances, Nmap would + fail to send on interfaces with low MTUs (such as SLIP lines) with + no way to bump down packet sizes for transport. [Kris] + o [NSE] The http library's request functions now accept an additional "auth" table within the option table, which if provided causes Basic authentication credentials to be sent. [David] diff --git a/libnetutil/netutil.cc b/libnetutil/netutil.cc index c84a5ee3d..920fb2678 100644 --- a/libnetutil/netutil.cc +++ b/libnetutil/netutil.cc @@ -3242,7 +3242,7 @@ int send_frag_ip_packet(int sd, struct eth_nfo *eth, u8 *packet, if (fragment > 1) // copy data payload memcpy(fpacket + headerlen, packet + headerlen + (fragment - 1) * mtu, fdatalen); - res = send_ip_packet_eth_or_sd(sd, eth, packet, packetlen); + res = send_ip_packet_eth_or_sd(sd, eth, fpacket, ntohs(ip->ip_len)); if (res == -1) break; }