]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Don't vote HSDir if we aren't voting Fast
authorDavid Goulet <dgoulet@ev0ke.net>
Wed, 2 Sep 2015 14:52:55 +0000 (16:52 +0200)
committerDavid Goulet <dgoulet@ev0ke.net>
Wed, 2 Sep 2015 15:03:00 +0000 (17:03 +0200)
Fixes #15963

Signed-off-by: David Goulet <dgoulet@ev0ke.net>
changes/bug15963 [new file with mode: 0644]
src/or/dirserv.c

diff --git a/changes/bug15963 b/changes/bug15963
new file mode 100644 (file)
index 0000000..8c903d2
--- /dev/null
@@ -0,0 +1,4 @@
+  o Hidden service directory enhancement
+    - Relays need to have the Fast flag to ge the HSDir flag. As this is
+      being written, we'll go from 2745 HSDirs down to 2342, a ~14% drop.
+      Fixes #15983.
index 65bfafba6cb3545b6ea3fc14c41730d2b450906f..6ac834fdc0d866e6741a7a989a2456dcfd8d075f 100644 (file)
@@ -1279,7 +1279,7 @@ dirserv_thinks_router_is_unreliable(time_t now,
 
 /** Return true iff <b>router</b> should be assigned the "HSDir" flag.
  * Right now this means it advertises support for it, it has a high uptime,
- * it has a DirPort open, it has the Stable flag and it's currently
+ * it has a DirPort open, it has the Stable and Fast flag and it's currently
  * considered Running.
  *
  * This function needs to be called after router-\>is_running has
@@ -1307,7 +1307,7 @@ dirserv_thinks_router_is_hs_dir(const routerinfo_t *router,
     uptime = real_uptime(router, now);
 
   return (router->wants_to_be_hs_dir && router->dir_port &&
-          node->is_stable &&
+          node->is_stable && node->is_fast &&
           uptime >= get_options()->MinUptimeHidServDirectoryV2 &&
           router_is_active(router, node, now));
 }