[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Make HSDir depend on Running/Valid again.



commit 7ee7149389fe189e03ba5a3a7bd312e748c2c9c8
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Tue Aug 11 08:38:30 2015 -0400

    Make HSDir depend on Running/Valid again.
    
    When we removed Running/Valid checks from Fast and Stable in 8712, I
    removed them from HSDir too, which apparently wasn't a good idea.
    
    Reverts part of a65e835800b1af2c2a4c215b.  Fixes bug 16524. Bugfix
    on 0.2.7.2-alpha.
---
 changes/bug16524 |    3 +++
 src/or/dirserv.c |    3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/changes/bug16524 b/changes/bug16524
new file mode 100644
index 0000000..1268fe8
--- /dev/null
+++ b/changes/bug16524
@@ -0,0 +1,3 @@
+  o Minor bugfixes (authority):
+    - Don't assign "HSDir" to a router if it isn't Valid and Running.
+      Fixes bug 16524; bugfix on 0.2.7.2-alpha.
\ No newline at end of file
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 072a339..e70b1b4 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -1373,7 +1373,8 @@ dirserv_thinks_router_is_hs_dir(const routerinfo_t *router,
 
   return (router->wants_to_be_hs_dir && router->dir_port &&
           node->is_stable &&
-          uptime >= get_options()->MinUptimeHidServDirectoryV2);
+          uptime >= get_options()->MinUptimeHidServDirectoryV2 &&
+          router_is_active(router, node, now));
 }
 
 /** Don't consider routers with less bandwidth than this when computing

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits