summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2008-03-10 05:17:46 +0000
committerRoger Dingledine <arma@torproject.org>2008-03-10 05:17:46 +0000
commit80ac7afb2ebb7e1233bc903ac8f510dc8cc4ad5f (patch)
treece9c4d76338a0e2e49897b97201c0071e276a57e
parent77edf15f0d12aa6706801588dcd319c66a5b5991 (diff)
downloadtor-80ac7afb2ebb7e1233bc903ac8f510dc8cc4ad5f.tar.gz
tor-80ac7afb2ebb7e1233bc903ac8f510dc8cc4ad5f.zip
If we set RelayBandwidthRate and RelayBandwidthBurst very high but
left BandwidthRate and BandwidthBurst at the default, we would be silently limited by those defaults. Now raise them to match the RelayBandwidth* values. svn:r13926
-rw-r--r--ChangeLog8
-rw-r--r--doc/spec/proposals/125-bridges.txt2
-rw-r--r--src/or/config.c7
3 files changed, 16 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index efb2bf8d89..c62f037ac1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Changes in version 0.2.0.22-rc - 2008-03-??
+ o Minor bugfixes:
+ - If we set RelayBandwidthRate and RelayBandwidthBurst very high but
+ left BandwidthRate and BandwidthBurst at the default, we would be
+ silently limited by those defaults. Now raise them to match the
+ RelayBandwidth* values.
+
+
Changes in version 0.2.0.21-rc - 2008-03-02
o Major bugfixes:
- The control port should declare that it requires password auth
diff --git a/doc/spec/proposals/125-bridges.txt b/doc/spec/proposals/125-bridges.txt
index 34c10d29d5..c6809a8e30 100644
--- a/doc/spec/proposals/125-bridges.txt
+++ b/doc/spec/proposals/125-bridges.txt
@@ -42,7 +42,7 @@ Status: Finished
can supply their bridge users with cached copies of all the various
Tor network information.
- As for Tor 0.2.0.13-alpha, bridges will answer begin_dir questions
+ As of Tor 0.2.0.13-alpha, bridges will answer begin_dir questions
(and cache dir info they see so the answers will be more useful)
whether their DirPort is enabled or not. (After all, we don't care if
they have an open or reachable DirPort to answer begin_dir questions.)
diff --git a/src/or/config.c b/src/or/config.c
index 0e21c596c1..94197ec455 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -3117,6 +3117,13 @@ options_validate(or_options_t *old_options, or_options_t *options,
if (options->BandwidthRate > options->BandwidthBurst)
REJECT("BandwidthBurst must be at least equal to BandwidthRate.");
+ /* if they set relaybandwidth* really high but left bandwidth*
+ * at the default, raise the defaults. */
+ if (options->RelayBandwidthRate > options->BandwidthRate)
+ options->BandwidthRate = options->RelayBandwidthRate;
+ if (options->RelayBandwidthBurst > options->BandwidthBurst)
+ options->BandwidthBurst = options->RelayBandwidthBurst;
+
if (accounting_parse_options(options, 1)<0)
REJECT("Failed to parse accounting options. See logs for details.");