mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 14:23:30 +01:00
Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2
This commit is contained in:
commit
d43470ad8a
5
changes/bug2470
Normal file
5
changes/bug2470
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
o Major bugfixes:
|
||||||
|
- If relays set RelayBandwidthBurst but not RelayBandwidthRate,
|
||||||
|
Tor would ignore their RelayBandwidthBurst setting,
|
||||||
|
potentially using more bandwidth than expected. Bugfix on
|
||||||
|
0.2.0.1-alpha. Reported by Paul Wouters. Fixes bug 2470.
|
@ -3345,6 +3345,11 @@ options_validate(or_options_t *old_options, or_options_t *options,
|
|||||||
"PerConnBWBurst", msg) < 0)
|
"PerConnBWBurst", msg) < 0)
|
||||||
return -1;
|
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 (server_mode(options)) {
|
||||||
if (options->BandwidthRate < ROUTER_REQUIRED_MIN_BANDWIDTH) {
|
if (options->BandwidthRate < ROUTER_REQUIRED_MIN_BANDWIDTH) {
|
||||||
tor_asprintf(msg,
|
tor_asprintf(msg,
|
||||||
@ -3373,9 +3378,6 @@ options_validate(or_options_t *old_options, or_options_t *options,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options->RelayBandwidthRate && !options->RelayBandwidthBurst)
|
|
||||||
options->RelayBandwidthBurst = options->RelayBandwidthRate;
|
|
||||||
|
|
||||||
if (options->RelayBandwidthRate > options->RelayBandwidthBurst)
|
if (options->RelayBandwidthRate > options->RelayBandwidthBurst)
|
||||||
REJECT("RelayBandwidthBurst must be at least equal "
|
REJECT("RelayBandwidthBurst must be at least equal "
|
||||||
"to RelayBandwidthRate.");
|
"to RelayBandwidthRate.");
|
||||||
|
Loading…
Reference in New Issue
Block a user