diff options
author | Roger Dingledine <arma@torproject.org> | 2007-11-17 01:53:33 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2007-11-17 01:53:33 +0000 |
commit | d6f8ba25c92430cbc0ba9f14da4c7518e309eb0e (patch) | |
tree | 942c088a3e105db8fe772081ba5c06ab1eeac40f /src | |
parent | d09439872d81046d6edee7a4fa03fc4b68db8ab3 (diff) | |
download | tor-d6f8ba25c92430cbc0ba9f14da4c7518e309eb0e.tar.gz tor-d6f8ba25c92430cbc0ba9f14da4c7518e309eb0e.zip |
back out r12509 and fix a better bug instead:
When authorities detected more than two relays running on the same
IP address, they were clearing all the status flags but forgetting
to clear the "hsdir" flag. So clients were being told that a
given relay was the right choice for a v2 hsdir lookup, yet they
never had its descriptor because it was marked as 'not running'
in the consensus.
svn:r12515
Diffstat (limited to 'src')
-rw-r--r-- | src/or/dirserv.c | 5 | ||||
-rw-r--r-- | src/or/routerlist.c | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 36f661a4ca..39263467d3 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -2022,7 +2022,10 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_env_t *private_key, if (digestmap_get(omit_as_sybil, ri->cache_info.identity_digest)) { rs->is_authority = rs->is_exit = rs->is_stable = rs->is_fast = rs->is_running = rs->is_named = rs->is_valid = rs->is_v2_dir = - rs->is_possible_guard = 0; + rs->is_hs_dir = rs->is_possible_guard = 0; + /* FFFF we might want some mechanism to check later on if we + * missed zeroing any flags: it's easy to add a new flag but + * forget to add it to this clause. */ } if (!vote_on_reachability) rs->is_running = 0; diff --git a/src/or/routerlist.c b/src/or/routerlist.c index eeb4909649..dce42b5731 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -4480,7 +4480,7 @@ hid_serv_get_responsible_directories(smartlist_t *responsible_dirs, i = start; do { routerstatus_t *r = smartlist_get(c->routerstatus_list, i); - if (r->is_hs_dir && r->is_running) { + if (r->is_hs_dir) { smartlist_add(responsible_dirs, r); if (++n_added == REND_NUMBER_OF_CONSECUTIVE_REPLICAS) return 0; |