Fixed a bug that prevented Nmap from finding any interfaces when one

of them had the type ARPHDR_IEEE80211; this was the case for wireless
interfaces operating in access point mode. This bug was reported by
Sebastiaan Vileijn.

http://seclists.org/nmap-dev/2012/q3/986
This commit is contained in:
djalal 2012-09-26 08:49:22 +00:00
parent 094aa2d3dc
commit e017b7c290
4 changed files with 34 additions and 0 deletions

View file

@ -1,5 +1,10 @@
# Nmap Changelog ($Id$); -*-text-*-
o Fixed a bug that prevented Nmap from finding any interfaces when one
of them had the type ARPHDR_IEEE80211; this was the case for wireless
interfaces operating in access point mode. This bug was reported by
Sebastiaan Vileijn. [Djalal Harouni]
o Fixed protocol number-to-name mapping. A patch was contributed by
hejianet.

View file

@ -1199,3 +1199,30 @@ index 865e500..4fe059c 100644
#else
# define NEXTIFR(i) (i + 1)
#endif
o Support IEEE 802.11 devices and make addr_ston able to handle them
Index: libdnet-stripped/include/dnet/arp.h
===================================================================
--- libdnet-stripped/include/dnet/arp.h (revision 29875)
+++ libdnet-stripped/include/dnet/arp.h (working copy)
@@ -39,6 +39,7 @@
#define ARP_HRD_ETH 0x0001 /* ethernet hardware */
#define ARP_HRD_IEEE802 0x0006 /* IEEE 802 hardware */
+#define ARP_HDR_IEEE80211 0x0321 /* IEEE 802.11 */
#define ARP_HRD_IEEE80211_RADIOTAP 0x0323 /* IEEE 802.11 + radiotap header */
#define ARP_HRD_VOID 0xFFFF /* Void type, nothing is known */
Index: libdnet-stripped/src/addr.c
===================================================================
--- libdnet-stripped/src/addr.c (revision 29875)
+++ libdnet-stripped/src/addr.c (working copy)
@@ -318,6 +318,7 @@
#endif
case AF_UNSPEC:
case ARP_HRD_ETH: /* XXX- Linux arp(7) */
+ case ARP_HDR_IEEE80211: /* IEEE 802.11 */
case ARP_HRD_IEEE80211_RADIOTAP: /* IEEE 802.11 + radiotap header */
a->addr_type = ADDR_TYPE_ETH;
a->addr_bits = ETH_ADDR_BITS;

View file

@ -39,6 +39,7 @@ struct arp_hdr {
#define ARP_HRD_ETH 0x0001 /* ethernet hardware */
#define ARP_HRD_IEEE802 0x0006 /* IEEE 802 hardware */
#define ARP_HDR_IEEE80211 0x0321 /* IEEE 802.11 */
#define ARP_HRD_IEEE80211_RADIOTAP 0x0323 /* IEEE 802.11 + radiotap header */
#define ARP_HRD_VOID 0xFFFF /* Void type, nothing is known */

View file

@ -318,6 +318,7 @@ addr_ston(const struct sockaddr *sa, struct addr *a)
#endif
case AF_UNSPEC:
case ARP_HRD_ETH: /* XXX- Linux arp(7) */
case ARP_HDR_IEEE80211: /* IEEE 802.11 */
case ARP_HRD_IEEE80211_RADIOTAP: /* IEEE 802.11 + radiotap header */
a->addr_type = ADDR_TYPE_ETH;
a->addr_bits = ETH_ADDR_BITS;