1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-15 20:29:03 +00:00

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
This commit is contained in:
david
2013-05-13 05:38:33 +00:00
parent 6b36602e8b
commit ce98c0ad1e

View File

@@ -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);