]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
dtrt when only relaybandwidthburst is set
authorRoger Dingledine <arma@torproject.org>
Tue, 8 Feb 2011 04:21:33 +0000 (23:21 -0500)
committerRoger Dingledine <arma@torproject.org>
Tue, 8 Feb 2011 04:21:33 +0000 (23:21 -0500)
fixes bug 2470

changes/bug2470 [new file with mode: 0644]
src/or/config.c

diff --git a/changes/bug2470 b/changes/bug2470
new file mode 100644 (file)
index 0000000..8ff97b7
--- /dev/null
@@ -0,0 +1,5 @@
+  o Major bugfixes:
+    - If relays set RelayBandwidthBurst but not RelayBandwidthRate,
+      Tor would ignore their RelayBandwidthBurst setting,
+      potentially using more bandwidth than expected. Bugfix on
+      0.2.0.1-alpha. Reported by Paul Wouters. Fixes bug 2470.
index f8cfd29f84e000e68ae2ad447272f7ea807fff21..8066a23a4a57ab26754e4fd06b4f9eb33934c76f 100644 (file)
@@ -3401,6 +3401,8 @@ options_validate(or_options_t *old_options, or_options_t *options,
 
   if (options->RelayBandwidthRate && !options->RelayBandwidthBurst)
     options->RelayBandwidthBurst = options->RelayBandwidthRate;
+  if (options->RelayBandwidthBurst && !options->RelayBandwidthRate)
+    options->RelayBandwidthRate = options->RelayBandwidthBurst;
 
   if (options->RelayBandwidthRate > options->RelayBandwidthBurst)
     REJECT("RelayBandwidthBurst must be at least equal "