mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
move the clause above the "if bw is too low" check
This commit is contained in:
parent
20b75989ac
commit
bcbcda309a
@ -3368,6 +3368,11 @@ options_validate(or_options_t *old_options, or_options_t *options,
|
||||
"RelayBandwidthBurst", msg) < 0)
|
||||
return -1;
|
||||
|
||||
if (options->RelayBandwidthRate && !options->RelayBandwidthBurst)
|
||||
options->RelayBandwidthBurst = options->RelayBandwidthRate;
|
||||
if (options->RelayBandwidthBurst && !options->RelayBandwidthRate)
|
||||
options->RelayBandwidthRate = options->RelayBandwidthBurst;
|
||||
|
||||
if (server_mode(options)) {
|
||||
if (options->BandwidthRate < ROUTER_REQUIRED_MIN_BANDWIDTH) {
|
||||
r = tor_snprintf(buf, sizeof(buf),
|
||||
@ -3399,11 +3404,6 @@ options_validate(or_options_t *old_options, or_options_t *options,
|
||||
}
|
||||
}
|
||||
|
||||
if (options->RelayBandwidthRate && !options->RelayBandwidthBurst)
|
||||
options->RelayBandwidthBurst = options->RelayBandwidthRate;
|
||||
if (options->RelayBandwidthBurst && !options->RelayBandwidthRate)
|
||||
options->RelayBandwidthRate = options->RelayBandwidthBurst;
|
||||
|
||||
if (options->RelayBandwidthRate > options->RelayBandwidthBurst)
|
||||
REJECT("RelayBandwidthBurst must be at least equal "
|
||||
"to RelayBandwidthRate.");
|
||||
|
Loading…
Reference in New Issue
Block a user