From 1cb72a4928042fcdcc1977bc5bb130f593061f90 Mon Sep 17 00:00:00 2001 From: david Date: Mon, 16 Jul 2012 18:26:39 +0000 Subject: [PATCH] Do ARP/ND scan with -PR --disable-arp-ping. These options look contradictory, but --disable-arp-ping is really an option to disable *implicit* ARP ping when you haven't asked for it. Actually requesting ARP should still do ARP scan. The contradiction that remains is the option name --disable-arp-ping, which doesn't exactly do what it says. The idea here is that you can just throw --disable-arp-ping at the end of your command lines, and implicit ARP scan will always be disabled, and any command using -PR will continue to work. --- targets.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/targets.cc b/targets.cc index 3fb12e1ed..bbd67241d 100644 --- a/targets.cc +++ b/targets.cc @@ -441,7 +441,7 @@ batchfull: hs->hostbatch[0]->af() == AF_INET && hs->hostbatch[0]->directlyConnected() && o.sendpref != PACKET_SEND_IP_STRONG && - o.implicitARPPing) { + (pingtype == PINGTYPE_ARP || o.implicitARPPing)) { arpping(hs->hostbatch, hs->current_batch_sz); arpping_done = true; } @@ -452,7 +452,7 @@ batchfull: hs->hostbatch[0]->af() == AF_INET6 && hs->hostbatch[0]->directlyConnected() && o.sendpref != PACKET_SEND_IP_STRONG && - o.implicitARPPing) { + (pingtype == PINGTYPE_ARP || o.implicitARPPing)) { arpping(hs->hostbatch, hs->current_batch_sz); arpping_done = true; }