aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2007-12-22 09:13:24 +0000
committerRoger Dingledine <arma@torproject.org>2007-12-22 09:13:24 +0000
commitce636beff9bd571e4e15242e164e93b07707f0a7 (patch)
treefd73dbcd8fd469df9186c901d4fbe8628c220fc8 /src/or
parent33f9c2c157be8a2634b4b44945c0b04241c4f713 (diff)
downloadtor-ce636beff9bd571e4e15242e164e93b07707f0a7.tar
tor-ce636beff9bd571e4e15242e164e93b07707f0a7.tar.gz
If the user sets RelayBandwidthRate but doesn't set
RelayBandwidthBurst, then make them equal rather than erroring out. svn:r12925
Diffstat (limited to 'src/or')
-rw-r--r--src/or/config.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c
index d61cb23f8..1da844aba 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -3016,6 +3016,9 @@ options_validate(or_options_t *old_options, or_options_t *options,
}
}
+ if (options->RelayBandwidthRate && !options->RelayBandwidthBurst)
+ options->RelayBandwidthBurst = options->RelayBandwidthRate;
+
if (options->RelayBandwidthRate > options->RelayBandwidthBurst)
REJECT("RelayBandwidthBurst must be at least equal "
"to RelayBandwidthRate.");