mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Don't set max parallelism when only --min-paralellism is given.
Setting --min-parallelism without also setting --max-parallelism would force the max parallelism to the same value. So, for example, --min-parallelism=1 would also limit the max parallelism to 1. This patch, based on one by Chris Woodbury, allows the max parallelism to rise above this minimum, up to the maximum defined by each scan phase.
This commit is contained in:
@@ -295,9 +295,9 @@ void ultra_timing_vals::drop_group(unsigned in_flight,
|
||||
void scan_performance_vars::init() {
|
||||
/* TODO: I should revisit these values for tuning. They should probably
|
||||
at least be affected by -T. */
|
||||
low_cwnd = MAX(o.min_parallelism, 1);
|
||||
max_cwnd = o.max_parallelism? o.max_parallelism : 300;
|
||||
group_initial_cwnd = box(o.min_parallelism, max_cwnd, 10);
|
||||
low_cwnd = o.min_parallelism ? o.min_parallelism : 1;
|
||||
max_cwnd = MAX(low_cwnd, o.max_parallelism ? o.max_parallelism : 300);
|
||||
group_initial_cwnd = box(low_cwnd, max_cwnd, 10);
|
||||
host_initial_cwnd = group_initial_cwnd;
|
||||
slow_incr = 1;
|
||||
/* The congestion window grows faster with more aggressive timing. */
|
||||
|
||||
Reference in New Issue
Block a user