diff --git a/scan_engine.cc b/scan_engine.cc index be775c1a7..81266f5b6 100644 --- a/scan_engine.cc +++ b/scan_engine.cc @@ -2457,6 +2457,8 @@ static void doAnyOutstandingRetransmits(UltraScanInfo *USI) { (maxtries > probe->tryno || // We may exceed maxtries if this is UDP... ((USI->udp_scan || (USI->ping_scan && USI->ptech.rawudpscan)) + // ...and we haven't exceeded the manually-set max_retries + && USI->perf.tryno_cap > probe->tryno // ...and there are more payloads we haven't tried. && udp_payload_count(probe->dport()) > probe->tryno) ) && !probe->isPing()) {