mirror of
https://github.com/nmap/nmap.git
synced 2026-07-11 18:55:08 +00:00
Prefer raw-eth sending for ND scan
This commit is contained in:
parent
367890df09
commit
b64e0cb9f5
1 changed files with 7 additions and 0 deletions
|
|
@ -956,6 +956,13 @@ void UltraScanInfo::Init(std::vector<Target *> &Targets, const struct scan_lists
|
|||
assert(!(sendpref & PACKET_SEND_IP_STRONG));
|
||||
sendpref = PACKET_SEND_ETH;
|
||||
}
|
||||
else if (ping_scan_nd && !(sendpref & PACKET_SEND_IP_STRONG)) {
|
||||
/* We prefer eth sending for ND, because otherwise the OS may convert
|
||||
* multicast to unicast (M2U) and we end up sending a Neighbor
|
||||
* Unreachability Detection probe instead of Neighber Discovery. It will
|
||||
* still work for host discovery, but doesn't give us a MAC address. */
|
||||
sendpref = PACKET_SEND_ETH_WEAK;
|
||||
}
|
||||
if (!raw_socket_or_eth(sendpref, Targets[0]->deviceName(), Targets[0]->ifType(),
|
||||
&rawsd, ðsd)) {
|
||||
fatal("Couldn't open a raw socket or eth handle.");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue