X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=blobdiff_plain;f=html%2Fcgi-bin%2Ftor.cgi;h=0c5477fd60fa7040046b6d0e19df20627ecf37fd;hp=0c173e0ccef97c163ab4f9836c337c97b6b3511a;hb=3308f8d09f5518c5f4654f5fe4b35d62eeee6642;hpb=ae99d423b9ed13c2b7960833b81becd781a1ac58 diff --git a/html/cgi-bin/tor.cgi b/html/cgi-bin/tor.cgi index 0c173e0cc..0c5477fd6 100644 --- a/html/cgi-bin/tor.cgi +++ b/html/cgi-bin/tor.cgi @@ -51,8 +51,7 @@ my @bandwidth_limits = ( 1024, # 1M 512, 256, - 128, - 64 + 160 ); my @accounting_periods = ('daily', 'weekly', 'monthly'); @@ -117,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);