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=dca5fda143c2e596329cfc8300166b74e991aaa5;hb=3308f8d09f5518c5f4654f5fe4b35d62eeee6642;hpb=6eb9c49d605918cbdb54cac58c08e909ff04efd1 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);