From 94bf0f879f1f24024d1f68ee7652ada213fae57d Mon Sep 17 00:00:00 2001 From: dmiller Date: Fri, 23 Dec 2016 22:58:01 +0000 Subject: [PATCH] Allow very late/unrelated ARP responses to affect host state. See #92 --- scan_engine_raw.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scan_engine_raw.cc b/scan_engine_raw.cc index d29eab633..20eb20ef2 100644 --- a/scan_engine_raw.cc +++ b/scan_engine_raw.cc @@ -1587,15 +1587,16 @@ bool get_arp_result(UltraScanInfo *USI, struct timeval *stime) { hss->target->reason.reason_id = ER_ARPRESPONSE; if (hss->probes_outstanding.empty()) { + /* It's up because we got a response, but doesn't count as a response + * within this timeout window. Go around again. */ + hss->target->flags = HOST_UP; continue; - /* TODO: I suppose I should really mark the @@# host as up */ } probeI = hss->probes_outstanding.end(); probeI--; ultrascan_host_probe_update(USI, hss, probeI, HOST_UP, &rcvdtime); /* Now that we know the host is up, we can forget our other probes. */ hss->destroyAllOutstandingProbes(); - /* TODO: Set target mac */ gotone = 1; // printf("Marked host %s as up!", hss->target->NameIP()); break;