From: Michael Tremer Date: Fri, 2 Aug 2013 08:57:01 +0000 (+0200) Subject: tor.cgi: Burst bandwidth may never be less than rate. X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=commitdiff_plain;h=3308f8d09f5518c5f4654f5fe4b35d62eeee6642;hp=6eb9c49d605918cbdb54cac58c08e909ff04efd1 tor.cgi: Burst bandwidth may never be less than rate. --- diff --git a/html/cgi-bin/tor.cgi b/html/cgi-bin/tor.cgi index dca5fda14..0c5477fd6 100644 --- a/html/cgi-bin/tor.cgi +++ b/html/cgi-bin/tor.cgi @@ -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);