summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-01-18 19:34:22 +0000
committerRoger Dingledine <arma@torproject.org>2005-01-18 19:34:22 +0000
commit4e369bc9e8aac84093f94c0d6402f3865a03a5b8 (patch)
treecb77734f7791359014624c4caa141dbc7e9f7993 /src
parentc8c6af659dae3c64954528ab975f26ea38201fdc (diff)
downloadtor-4e369bc9e8aac84093f94c0d6402f3865a03a5b8.tar.gz
tor-4e369bc9e8aac84093f94c0d6402f3865a03a5b8.zip
allow bandwidthburst to be smaller, but whine if it's small.
svn:r3364
Diffstat (limited to 'src')
-rw-r--r--src/or/config.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 353f306450..b0cf8474c6 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -1394,10 +1394,6 @@ options_validate(or_options_t *options)
result = -1;
}
- if (2*options->BandwidthRate >= options->BandwidthBurst) {
- log(LOG_WARN,"BandwidthBurst must be more than twice BandwidthRate.");
- result = -1;
- }
if (options->BandwidthRate > INT_MAX) {
log(LOG_WARN,"BandwidthRate must be less than %d",INT_MAX);
result = -1;
@@ -1411,6 +1407,15 @@ options_validate(or_options_t *options)
log(LOG_WARN,"BandwidthRate is set to %d bytes/second. For servers, it must be at least %d.", (int)options->BandwidthRate, ROUTER_REQUIRED_MIN_BANDWIDTH*2);
result = -1;
}
+ if (options->BandwidthRate > options->BandwidthBurst) {
+ log(LOG_WARN,"BandwidthBurst must be at least equal to BandwidthRate.");
+ result = -1;
+ }
+ if (2*options->BandwidthRate > options->BandwidthBurst) {
+ log(LOG_NOTICE,"You have chosen a BandwidthBurst less than twice BandwidthRate. Please consider setting your BandwidthBurst higher (at least %d), to provide better service to the Tor network.", (int)(2*options->BandwidthRate));
+ result = -1;
+ }
+
if (options->_MonthlyAccountingStart) {
if (options->AccountingStart) {