[or-cvs] r13935: forward-port recent changes (tor/trunk/src/or)

arma at seul.org arma at seul.org
Mon Mar 10 07:50:09 UTC 2008


Author: arma
Date: 2008-03-10 03:50:09 -0400 (Mon, 10 Mar 2008)
New Revision: 13935

Modified:
   tor/trunk/src/or/config.c
Log:
forward-port recent changes


Modified: tor/trunk/src/or/config.c
===================================================================
--- tor/trunk/src/or/config.c	2008-03-10 07:49:20 UTC (rev 13934)
+++ tor/trunk/src/or/config.c	2008-03-10 07:50:09 UTC (rev 13935)
@@ -243,7 +243,7 @@
   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 @@
   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 @@
   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.");
 



More information about the tor-commits mailing list