1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-14 19:59:02 +00:00

Fix an embarrassing error: In nmap-perf I had moved the bit of code that

increases the scan dealy with an increase in max_successful_tryno. When I
reverted a bunch of changes in r11651, I removed the moved code, leaving the
scan delay increase nowhere. This puts it back in ultrascan_port_probe_update
where it was before.
This commit is contained in:
david
2009-01-08 23:44:08 +00:00
parent 90ba6b97d0
commit f99573f069

View File

@@ -2699,9 +2699,25 @@ static void ultrascan_port_probe_update(UltraScanInfo *USI, HostScanStats *hss,
adjust_ping = false;
}
if (adjust_timing)
if (adjust_timing) {
ultrascan_adjust_timing(USI, hss, probe, rcvdtime);
if (rcvdtime != NULL && probe->tryno > hss->max_successful_tryno) {
/* We got a positive response to a higher tryno than we've seen so far. */
hss->max_successful_tryno = probe->tryno;
if (o.debugging)
log_write(LOG_STDOUT, "Increased max_successful_tryno for %s to %d (packet drop)\n", hss->target->targetipstr(), hss->max_successful_tryno);
if (hss->max_successful_tryno > ((o.timing_level >= 4)? 4 : 3)) {
unsigned int olddelay = hss->sdn.delayms;
hss->boostScanDelay();
if (o.verbose && hss->sdn.delayms != olddelay)
log_write(LOG_STDOUT, "Increasing send delay for %s from %d to %d due to max_successful_tryno increase to %d\n",
hss->target->targetipstr(), olddelay, hss->sdn.delayms,
hss->max_successful_tryno);
}
}
}
/* If this probe received a positive response, consider making it the new
timing ping probe. */
if (rcvdtime != NULL && adjust_ping