mirror of
https://github.com/nmap/nmap.git
synced 2025-12-15 04:09:01 +00:00
This fixes the following bug: When scanning with an Ethernet handle (as opposed to raw sockets), only the first host in an OS scan group would get a result. All others would be blank fingerprints with R=N for every probe. This was first noticed on Windows because Ethernet is the default sending method, but it affects other platforms with --send-eth. OS scan initialized an Ethernet handle once for each group, and recorded the first-hop MAC address of the first target at that time. That first-hop address was used for all targets. This failed on a switched LAN, when the first-hop address for every host is different (it's the MAC address of each target). All the various high-level probe sending functions now do their work through three low-level sending functions: one each for TCP, UDP, and ICMP. Those low-level functions take care of setting the MAC addresses before each send. I checked and the other places where Ethernet sends are used do not have this problem. ultra_scan, idle scan, and traceroute all set the addresses before every send.
123 KiB
123 KiB