mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-18 23:12:59 +02:00
tor.cgi: Burst bandwidth may never be less than rate.
This commit is contained in:
@@ -116,6 +116,14 @@ if ($settings{'ACTION'} eq $Lang::tr{'save'}) {
|
||||
}
|
||||
}
|
||||
|
||||
# Burst bandwidth must be less or equal to bandwidth rate.
|
||||
if ($settings{'TOR_RELAY_BANDWIDTH_RATE'} == 0) {
|
||||
$settings{'TOR_RELAY_BANDWIDTH_BURST'} = 0;
|
||||
|
||||
} elsif ($settings{'TOR_RELAY_BANDWIDTH_BURST'} < $settings{'TOR_RELAY_BANDWIDTH_RATE'}) {
|
||||
$settings{'TOR_RELAY_BANDWIDTH_BURST'} = $settings{'TOR_RELAY_BANDWIDTH_RATE'};
|
||||
}
|
||||
|
||||
if ($errormessage eq '') {
|
||||
# Write configuration settings to file.
|
||||
&General::writehash("${General::swroot}/tor/settings", \%settings);
|
||||
|
||||
Reference in New Issue
Block a user