projects
/
people
/
teissler
/
ipfire-2.x.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6eb9c49
)
tor.cgi: Burst bandwidth may never be less than rate.
author
Michael Tremer
<michael.tremer@ipfire.org>
Fri, 2 Aug 2013 08:57:01 +0000
(10:57 +0200)
committer
Michael Tremer
<michael.tremer@ipfire.org>
Fri, 2 Aug 2013 08:57:01 +0000
(10:57 +0200)
html/cgi-bin/tor.cgi
patch
|
blob
|
blame
|
history
diff --git
a/html/cgi-bin/tor.cgi
b/html/cgi-bin/tor.cgi
index dca5fda143c2e596329cfc8300166b74e991aaa5..0c5477fd60fa7040046b6d0e19df20627ecf37fd 100644
(file)
--- 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);