mirror of
https://github.com/nmap/nmap.git
synced 2026-01-23 14:49:02 +00:00
Move the check for a host being timed out or completed to before the check for a minimum rate in HostScanStats::sendOK. We don't want to tell a host that has nothing to send to send something.
This commit is contained in:
@@ -1100,6 +1100,11 @@ bool HostScanStats::sendOK(struct timeval *when) {
|
||||
struct timeval probe_to, earliest_to, sendTime;
|
||||
long tdiff;
|
||||
|
||||
if (target->timedOut(&USI->now) || completed()) {
|
||||
if (when) *when = USI->now;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* If the group stats say we need to send a probe to enforce a minimum
|
||||
scanning rate, then we need to step up and send a probe. */
|
||||
if (o.min_packet_send_rate != 0.0) {
|
||||
@@ -1110,11 +1115,6 @@ bool HostScanStats::sendOK(struct timeval *when) {
|
||||
}
|
||||
}
|
||||
|
||||
if (target->timedOut(&USI->now) || completed()) {
|
||||
if (when) *when = USI->now;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (rld.rld_waiting) {
|
||||
packTime = TIMEVAL_MSEC_SUBTRACT(rld.rld_waittime, USI->now);
|
||||
if (packTime <= 0) {
|
||||
|
||||
Reference in New Issue
Block a user