Nmap Development mailing list archives

Re: [PATCH] UDP --badsum fix


From: Fyodor <fyodor () insecure org>
Date: Mon, 22 Jan 2007 12:40:10 -0800

On Mon, Jan 22, 2007 at 12:07:45PM -0800, doug () hcsw org wrote:

Small fix. I was reading the UDP RFC http://www.ietf.org/rfc/rfc768.txt

Great catch!  Would you apply it to /nmap ?  Also, I think the change
should probably go into at least the osscan.cc:174 instance below
(changing to a decrement should be fine):

flog~/nmap>grep -n -A1 o.badsum *.cc
nmap.cc:806:    o.badsum = 1;
nmap.cc-807-      } else if (strcmp(long_options[option_index].name, "iR") == 0) {
--
osscan.cc:174:  if ( o.badsum )
osscan.cc-175-    udp->uh_sum++;
--
targets.cc:1049:if ( o.badsum )
targets.cc-1050-  pingpkt.checksum--;
--
tcpip.cc:1188:if ( o.badsum )
tcpip.cc-1189-  --tcp->th_sum;
--
tcpip.cc:1439:if ( o.badsum )
tcpip.cc-1440-  --pingpkt.checksum;
--
tcpip.cc:1499: if (o.badsum)
tcpip.cc-1500-   --igmp.igmp_cksum;
--
tcpip.cc:1682:  if ( o.badsum )
tcpip.cc-1683-    --udp->uh_sum;

Cheers,
-F

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


Current thread: