1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-23 16:09:02 +00:00

ultrascan: bail early if there are no probes in the current scan

This shouldn't ever happen, but it currently does for host discovery
scans using -PR where the target is not directly connected. See #1361
This commit is contained in:
dmiller
2018-10-22 20:12:45 +00:00
parent 467b06008e
commit 14705cd417

View File

@@ -2730,6 +2730,13 @@ void ultra_scan(std::vector<Target *> &Targets, struct scan_lists *ports,
UltraScanInfo USI(Targets, ports, scantype); UltraScanInfo USI(Targets, ports, scantype);
if (USI.gstats->numprobes <= 0) {
if (o.debugging) {
log_write(LOG_STDOUT, "Skipping %s: no probes to send\n", scantype2str(scantype));
}
return;
}
/* Use the requested timeouts. */ /* Use the requested timeouts. */
if (to != NULL) if (to != NULL)
USI.gstats->to = *to; USI.gstats->to = *to;