Nmap Development mailing list archives

Ncat without IPv6 and rpl_malloc


From: Dirk Loss <lists () dirk-loss de>
Date: Fri, 19 Dec 2008 17:43:28 +0100

Hi,

in order to cross-compile Ncat for my ARMv5 based embedded Linux device I had to apply a little patch (see below). Now Ncat seems to work, but I guess my patch is not quite correct.

What would be the recommended way to disable IPv6 (which my device doesn't support) and rpl_malloc (which lead to a compilation error)?

Regards
Dirk
Index: configure
===================================================================
--- configure   (Revision 11430)
+++ configure   (Arbeitskopie)
@@ -6734,7 +6734,7 @@
 
 
 cat >>confdefs.h <<\_ACEOF
-#define malloc rpl_malloc
+#define malloc malloc
 _ACEOF
 
 fi
Index: config.h.in
===================================================================
--- config.h.in (Revision 11430)
+++ config.h.in (Arbeitskopie)
@@ -1,5 +1,5 @@
 /* config.h.in.  Generated from configure.ac by autoheader.  */
-
+#undef HAVE_IPV6
 /* Define to 1 if you have the <arpa/inet.h> header file. */
 #undef HAVE_ARPA_INET_H
 
Index: ncat_main.c
===================================================================
--- ncat_main.c (Revision 11430)
+++ ncat_main.c (Arbeitskopie)
@@ -423,13 +423,6 @@
             if (!srcaddrlen)
                 srcaddrlen = sizeof(struct sockaddr_in);
         }
-#ifdef HAVE_IPV6
-        else {
-            ((struct sockaddr_in6 *) &srcaddr)->sin6_port = htons((unsigned short) srcport);
-            if (!srcaddrlen)
-                srcaddrlen = sizeof(struct sockaddr_in6);
-        }
-#endif
     }
 
     if (optind == argc) {
@@ -572,10 +565,6 @@
 
             if (oaf == AF_INET)
                 sin->sin_addr.s_addr = INADDR_ANY;
-#ifdef HAVE_IPV6
-            else
-                sin6->sin6_addr = in6addr_any;
-#endif
         }
 
         /* Actually set our source address */

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

Current thread: