[28939] trunk/dports/net/nmap

source_changes at macosforge.org source_changes at macosforge.org
Wed Sep 12 09:23:21 PDT 2007


Revision: 28939
          http://trac.macosforge.org/projects/macports/changeset/28939
Author:   ricci at macports.org
Date:     2007-09-12 09:23:17 -0700 (Wed, 12 Sep 2007)

Log Message:
-----------
Add patch to show an error on bad interfaces rather than abort.
Patch is from upstream svn and should allow nmap to work with
 vmnet interfaces (currently no bpf implementation) and on
 systems with more than 4 active interfaces (bpf limit).

Modified Paths:
--------------
    trunk/dports/net/nmap/Portfile

Added Paths:
-----------
    trunk/dports/net/nmap/files/
    trunk/dports/net/nmap/files/patch-tcpip.cc

Modified: trunk/dports/net/nmap/Portfile
===================================================================
--- trunk/dports/net/nmap/Portfile	2007-09-12 16:05:51 UTC (rev 28938)
+++ trunk/dports/net/nmap/Portfile	2007-09-12 16:23:17 UTC (rev 28939)
@@ -3,6 +3,7 @@
 PortSystem 1.0
 name		nmap
 version		4.20
+revision	1
 categories	net
 maintainers	opendarwin.org at darkart.com dluke at geeklair.net
 description	Port scanning utility for large networks
@@ -32,6 +33,8 @@
 		port:pcre \
 		port:zlib
 
+patchfiles	patch-tcpip.cc
+
 use_bzip2	yes
 
 configure.args	--without-nmapfe \

Added: trunk/dports/net/nmap/files/patch-tcpip.cc
===================================================================
--- trunk/dports/net/nmap/files/patch-tcpip.cc	                        (rev 0)
+++ trunk/dports/net/nmap/files/patch-tcpip.cc	2007-09-12 16:23:17 UTC (rev 28939)
@@ -0,0 +1,16 @@
+--- tcpip.cc.b	2007-09-12 09:17:26.000000000 -0700
++++ tcpip.cc	2007-09-12 09:21:19.000000000 -0700
+@@ -2691,9 +2691,10 @@
+ 	eth_t *ethsd = eth_open_cached(mydevs[numifaces].devname);
+ 	eth_addr_t ethaddr;
+ 
+-	if (!ethsd) 
+-	  fatal("%s: Failed to open ethernet interface (%s). A possible cause on BSD operating systems is running out of BPF devices (see http://seclists.org/lists/nmap-dev/2006/Jan-Mar/0014.html).", __FUNCTION__,
+-		mydevs[numifaces].devname);
++	if (!ethsd) {
++		error("Warning: Unable to open interface %s -- skipping it.", mydevs[numifaces].devname); 
++		continue; 
++	}
+ 	if (eth_get(ethsd, &ethaddr) != 0) 
+ 	  fatal("%s: Failed to obtain MAC address for ethernet interface (%s)",
+ 		__FUNCTION__, mydevs[numifaces].devname);

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070912/dee3fe7a/attachment.html


More information about the macports-changes mailing list