From ce98c0ad1eff30d30e49a734d5d4c955309bc59a Mon Sep 17 00:00:00 2001 From: david Date: Mon, 13 May 2013 05:38:33 +0000 Subject: [PATCH] Don't consider NOARP devices as Ethernet devices. NStorm reported a failure of ARP ping scan on OpenVZ venet devices, which don't have a MAC address and can't do ARP. We don't keep interface flags such as NOARP at the target level, so check whether the interfaces returned by libdnet are both INTF_TYPE_ETH and don't have INTF_FLAG_NOARP set; otherwise call them "other" interfaces. http://seclists.org/nmap-dev/2013/q1/349 http://openvz.org/Virtual_network_device --- libnetutil/netutil.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libnetutil/netutil.cc b/libnetutil/netutil.cc index 4b50567c9..3ee4e5c17 100644 --- a/libnetutil/netutil.cc +++ b/libnetutil/netutil.cc @@ -1312,7 +1312,7 @@ static int collect_dnet_interfaces(const struct intf_entry *entry, void *arg) { sizeof(dcrn->ifaces[dcrn->numifaces].devfullname)); /* Interface type */ - if (entry->intf_type == INTF_TYPE_ETH) { + if (entry->intf_type == INTF_TYPE_ETH && (entry->intf_flags & INTF_FLAG_NOARP) == 0) { dcrn->ifaces[dcrn->numifaces].device_type = devt_ethernet; /* Collect the MAC address since this is ethernet */ memcpy(dcrn->ifaces[dcrn->numifaces].mac, &entry->intf_link_addr.addr_eth.data, 6);