Nmap Development mailing list archives

Re: Bug in OpenBSD nmap (revisited)


From: Eric <eric-list-nmap () catastrophe net>
Date: Wed, 16 Apr 2003 02:42:55 -0500

On Mon, 2003-04-14 at 14:02:26 -0500, Eric proclaimed...

Starting nmap 3.21CSW ( www.insecure.org/nmap/ ) at 2003-04-14 13:57 CDT
sendto in send_ip_raw: sendto(7, packet, 32, 0, 10.6.6.6, 16) 
 => Invalid argument
Sleeping 15 seconds then retrying
sendto in send_ip_raw: sendto(7, packet, 32, 0, 10.6.6.6, 16)
 => Invalid argument
Sleeping 60 seconds then retrying

This is on OpenBSD 3.2 using nmap 3.21CSW.

[snip]

Out of boredom, I decided to try the following patches in 3.21CSW

This still yields the same problems.

- Eric


--- tcpip.cc    Wed Apr 16 02:40:50 2003
+++ tcpip.cc.orig       Wed Apr 16 02:34:10 2003
@@ -575,7 +575,7 @@
   readtcppacket(packet,BSDUFIX(ip->ip_len));
 }
 
-res = Sendto("send_tcp_raw", sd, packet, ip->ip_len, 0,
+res = Sendto("send_tcp_raw", sd, packet, BSDUFIX(ip->ip_len), 0,
             (struct sockaddr *)&sock,  (int)sizeof(struct sockaddr_in));
 
 if (source_malloced) free((void *) source);
@@ -863,7 +863,7 @@
   readudppacket(packet,1);
 }
 
-res = Sendto("send_udp_raw", sd, packet, ip->ip_len, 0,
+res = Sendto("send_udp_raw", sd, packet, BSDUFIX(ip->ip_len), 0,
             (struct sockaddr *)&sock,  (int)sizeof(struct sockaddr_in));
 
 if (source_malloced) free(source);
@@ -1118,7 +1118,7 @@
 }
 
 
-res = Sendto("send_ip_raw", sd, packet, ip->ip_len, 0,
+res = Sendto("send_ip_raw", sd, packet, BSDUFIX(ip->ip_len), 0,
             (struct sockaddr *)&sock,  (int)sizeof(struct sockaddr_in));
 
 if (source_malloced) free(source);


--- nmap.h      Wed Apr 16 02:37:29 2003
+++ nmap.h.orig Wed Apr 16 02:37:19 2003
@@ -315,7 +315,7 @@
 #endif
 
 #ifndef BSDFIX
-#if FREEBSD || BSDI || NETBSD
+#if FREEBSD || BSDI || NETBSD || OPENBSD
 #define BSDFIX(x) x
 #define BSDUFIX(x) x
 #else



---------------------------------------------------------------------
For help using this (nmap-dev) mailing list, send a blank email to 
nmap-dev-help () insecure org . List run by ezmlm-idx (www.ezmlm.org).



Current thread: