[or-cvs] [tor/master] delay geoip stats even more for relays-turned-bridges

arma at torproject.org arma at torproject.org
Wed Aug 18 20:12:55 UTC 2010


Author: Roger Dingledine <arma at torproject.org>
Date: Wed, 18 Aug 2010 16:12:44 -0400
Subject: delay geoip stats even more for relays-turned-bridges
Commit: c1260cb6ec7e7fb85bc7c3f318199bae12f1716e

---
 changes/bridge-geoip-delay |    6 ++++++
 src/or/config.c            |    7 ++++---
 2 files changed, 10 insertions(+), 3 deletions(-)
 create mode 100644 changes/bridge-geoip-delay

diff --git a/changes/bridge-geoip-delay b/changes/bridge-geoip-delay
new file mode 100644
index 0000000..1f8e751
--- /dev/null
+++ b/changes/bridge-geoip-delay
@@ -0,0 +1,6 @@
+  o Minor bugfixes:
+    - Delay geoip stats collection by bridges for 6 hours, not 2 hours,
+      when we switch from being a public relay to a bridge. Otherwise
+      there will still be clients that see the relay in their consensus,
+      and the stats will end up wrong. Bugfix on 0.2.1.15-rc; fixes bug
+      932 even more.
diff --git a/src/or/config.c b/src/or/config.c
index d020c88..9d98d15 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -1255,8 +1255,9 @@ options_act(or_options_t *old_options)
 /* How long should we delay counting bridge stats after becoming a bridge?
  * We use this so we don't count people who used our bridge thinking it is
  * a relay. If you change this, don't forget to change the log message
- * below. */
-#define RELAY_BRIDGE_STATS_DELAY (2 * 60 * 60)
+ * below. It's 4 hours (the time it takes to stop being used by clients)
+ * plus some extra time for clock skew. */
+#define RELAY_BRIDGE_STATS_DELAY (6 * 60 * 60)
 
     if (! bool_eq(options->BridgeRelay, old_options->BridgeRelay)) {
       int was_relay = 0;
@@ -1268,7 +1269,7 @@ options_act(or_options_t *old_options)
         }
         geoip_bridge_stats_init(int_start);
         log_info(LD_CONFIG, "We are acting as a bridge now.  Starting new "
-                 "GeoIP stats interval%s.", was_relay ? " in 2 "
+                 "GeoIP stats interval%s.", was_relay ? " in 6 "
                  "hours from now" : "");
       } else {
         geoip_bridge_stats_term();
-- 
1.7.1



More information about the tor-commits mailing list