diff options
author | David Goulet <dgoulet@ev0ke.net> | 2015-05-11 11:27:30 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-06-08 10:28:35 -0400 |
commit | 6785f0b65a106561a36239d89140bf18be3d7c6c (patch) | |
tree | 65240ae1d702336eada7e2ea03202e04a9cd6a09 /src/or/dirserv.c | |
parent | f2ff8145820243a05803367d31c8b34e03048706 (diff) | |
download | tor-6785f0b65a106561a36239d89140bf18be3d7c6c.tar.gz tor-6785f0b65a106561a36239d89140bf18be3d7c6c.zip |
HSDir flag now requires the Stable flag
Fixes #8243
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 a024be8342..65bfafba6c 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -1278,8 +1278,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, and it's currently considered Running. + * 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 + * considered Running. * * This function needs to be called after router-\>is_running has * been set. @@ -1306,6 +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 && uptime >= get_options()->MinUptimeHidServDirectoryV2 && router_is_active(router, node, now)); } |