1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-15 20:29:03 +00:00

Use pingprobe.type != PS_NONE rather than pingprobe_state != PORT_UNKNOWN when

checking if a pingprobe has been set. We always use PORT_UNKNOWN during host
discovery (rather than HOST_UP or HOST_DOWN) to avoid conflicts with other
PORT_* constants. See the log for r8784.
This commit is contained in:
david
2009-01-03 21:29:17 +00:00
parent e039a96715
commit 76b7a7383f

View File

@@ -2307,7 +2307,7 @@ void HostScanStats::getTiming(struct ultra_timing_vals *tmng) {
/* Use the per-host value if a pingport has been found or very few probes
have been sent */
if (target->pingprobe_state != PORT_UNKNOWN || numprobes_sent < 80) {
if (target->pingprobe.type != PS_NONE || numprobes_sent < 80) {
*tmng = timing;
return;
}
@@ -3174,7 +3174,8 @@ static void doAnyPings(UltraScanInfo *USI) {
}
/* Next come global pings. We never send more than one of these at at time. */
if (USI->gstats->pinghost != NULL && USI->gstats->pinghost->target->pingprobe_state != PORT_UNKNOWN &&
if (USI->gstats->pinghost != NULL &&
USI->gstats->pinghost->target->pingprobe.type != PS_NONE &&
USI->gstats->pinghost->num_probes_active == 0 &&
USI->gstats->probes_sent >= USI->gstats->lastping_sent_numprobes + 20 &&
TIMEVAL_SUBTRACT(USI->now, USI->gstats->lastrcvd) > USI->perf.pingtime &&