mirror of
https://github.com/nmap/nmap.git
synced 2025-12-08 21:51:28 +00:00
eth_get_pcap_devname as a wrapper. In addition to the hardware address check, add a check of the textual interface descriptions in order better to distinguish interfaces. It appears to me that the pcap description (pdev->description) is the same as what is returned by a call to PacketRequest with an OID of OID_GEN_FRIENDLY_NAME, so that's what I'm comparing. That differs from OID_GEN_VENDOR_NAME, which is what you get in ifrow.bDescr from GetIfTable. We've found that simply comparing hardware addresses is not enough when using Windows "teamed" (link-aggregated) interfaces. In a simple example, two NICs are teamed together, leading to three interfaces visible to libdnet: the two physical NICs and the virtual teamed interface. All three of these have the same MAC address. What was happening was the eth0 interface was being assigned to one of the physical NICs, packets were sent over it, but the replies were not necessarily coming back to the same physical NIC.