diff options
author | Matthew Finkel <Matthew.Finkel@gmail.com> | 2015-05-25 23:09:33 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-12-18 13:14:09 -0500 |
commit | fb80a748eab12c246afc093801ea0b3c52543955 (patch) | |
tree | d4bb4cd56bfaad458d3d80d9f5ad5efc3c4bc809 /src/or/dirserv.c | |
parent | 3007de8efc962f21aa3649463b0d502f3747f687 (diff) | |
download | tor-fb80a748eab12c246afc093801ea0b3c52543955.tar.gz tor-fb80a748eab12c246afc093801ea0b3c52543955.zip |
A router must be a dir cache before it may be HSDir
Fixes #15801
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index fc6899b3c8..620d324704 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -1350,8 +1350,9 @@ 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 and Fast flag and it's currently + * it's a directory cache, it has the Stable and Fast flags, and it's currently * considered Running. * * This function needs to be called after router-\>is_running has @@ -1378,7 +1379,8 @@ dirserv_thinks_router_is_hs_dir(const routerinfo_t *router, else uptime = real_uptime(router, now); - return (router->wants_to_be_hs_dir && router->dir_port && + return (router->wants_to_be_hs_dir && + router->supports_tunnelled_dir_requests && node->is_stable && node->is_fast && uptime >= get_options()->MinUptimeHidServDirectoryV2 && router_is_active(router, node, now)); |