From e7a4a8a364f6175c7eb327af3a918684c050d9a2 Mon Sep 17 00:00:00 2001 From: david Date: Sat, 8 Dec 2012 11:04:23 +0000 Subject: [PATCH] Set sa.sndd_8022_ethertype to 0 in eth-ndd.c. This file is used for Ethernet handles on AIX. We had a report from Peter O'Gorman that setting this member to 0 rather than ETH_TYPE_IP was necessary to avoid an EEXIST error on bind. http://seclists.org/nmap-dev/2011/q4/349 http://seclists.org/nmap-dev/2011/q4/353 http://seclists.org/nmap-dev/2011/q4/att-353/aix.patch https://code.google.com/p/libdnet/issues/detail?id=23 However Ben Lentz more recently tried the patch and said that he still got an EEXIST on bind. http://seclists.org/nmap-dev/2012/q4/327 http://seclists.org/nmap-dev/2012/q4/395 So who knows what the right thing to do here is. The messages from IBM seem to say that setting ETH_TYPE_IP is definitely wrong though. --- libdnet-stripped/src/eth-ndd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libdnet-stripped/src/eth-ndd.c b/libdnet-stripped/src/eth-ndd.c index a658d2be0..7ac196c8b 100644 --- a/libdnet-stripped/src/eth-ndd.c +++ b/libdnet-stripped/src/eth-ndd.c @@ -42,7 +42,7 @@ eth_open(const char *device) sa.sndd_8022_family = AF_NDD; sa.sndd_8022_len = sizeof(sa); sa.sndd_8022_filtertype = NS_ETHERTYPE; - sa.sndd_8022_ethertype = ETH_TYPE_IP; + sa.sndd_8022_ethertype = 0; sa.sndd_8022_filterlen = sizeof(struct ns_8022); strlcpy(sa.sndd_8022_nddname, device, sizeof(sa.sndd_8022_nddname));