From a20fda6480ffa3389686a942d166aa08509d5f0b Mon Sep 17 00:00:00 2001 From: dmiller Date: Tue, 19 Jan 2021 19:57:37 +0000 Subject: [PATCH] Respect --max-retries in UDP scan even when some payloads haven't been sent. --- scan_engine.cc | 2 ++ 1 file changed, 2 insertions(+) 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()) {