summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2008-03-10 07:50:09 +0000
committerRoger Dingledine <arma@torproject.org>2008-03-10 07:50:09 +0000
commit0df15642980fd050ff7e77a311b03c6b5e4ef8dc (patch)
treebc2efb86ca30e59a09b963d6a0a7248d04836f03 /src
parent28a220b3cc6d18ae2cf6f1f13c41c9c817c97e3b (diff)
downloadtor-0df15642980fd050ff7e77a311b03c6b5e4ef8dc.tar.gz
tor-0df15642980fd050ff7e77a311b03c6b5e4ef8dc.zip
forward-port recent changes
svn:r13935
Diffstat (limited to 'src')
-rw-r--r--src/or/config.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 123fe1d9b3..ca5724fa04 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -243,7 +243,7 @@ static config_var_t _option_vars[] = {
V(OutboundBindAddress, STRING, NULL),
OBSOLETE("PathlenCoinWeight"),
V(PidFile, STRING, NULL),
- V(PreferTunneledDirConns, BOOL, "0"),
+ V(PreferTunneledDirConns, BOOL, "1"),
V(ProtocolWarnings, BOOL, "0"),
V(PublishServerDescriptor, CSV, "1"),
V(PublishHidServDescriptors, BOOL, "1"),
@@ -289,7 +289,7 @@ static config_var_t _option_vars[] = {
OBSOLETE("TrafficShaping"),
V(TransListenAddress, LINELIST, NULL),
V(TransPort, UINT, "0"),
- V(TunnelDirConns, BOOL, "0"),
+ V(TunnelDirConns, BOOL, "1"),
V(UpdateBridgesFromAuthority, BOOL, "0"),
V(UseBridges, BOOL, "0"),
V(UseEntryGuards, BOOL, "1"),
@@ -3118,6 +3118,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.");