aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerlist.c
diff options
context:
space:
mode:
authorteor <teor2345@gmail.com>2016-11-30 12:20:28 +1100
committerteor <teor2345@gmail.com>2016-11-30 12:20:28 +1100
commit04f794489107bab6316d60ade7228d4443beb3a6 (patch)
treed8f6fdd2adee98d972b01da9783cf604f9cae60a /src/or/routerlist.c
parente061cf4d1d7e9d8533cde936f0904d4f7b877746 (diff)
downloadtor-04f794489107bab6316d60ade7228d4443beb3a6.tar.gz
tor-04f794489107bab6316d60ade7228d4443beb3a6.zip
Stop discarding downloaded full descriptors when using microdescs for circuits
This affects clients with FetchUselessDescriptors 1. It might also cause subtle bugs on directory mirrors and authorities, causing them to consider all full descriptors as failed or old.
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r--src/or/routerlist.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 9d5b74d8b6..9bcca76b63 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -3896,7 +3896,7 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg,
router_describe(router));
*msg = "Router descriptor is not referenced by any network-status.";
- /* Only journal this desc if we'll be serving it. */
+ /* Only journal this desc if we want to keep old descriptors */
if (!from_cache && should_cache_old_descriptors())
signed_desc_append_to_journal(&router->cache_info,
&routerlist->desc_store);
@@ -4526,13 +4526,14 @@ router_load_extrainfo_from_string(const char *s, const char *eos,
smartlist_free(extrainfo_list);
}
-/** Return true iff any networkstatus includes a descriptor whose digest
- * is that of <b>desc</b>. */
+/** Return true iff the latest ns-flavored consensus includes a descriptor
+ * whose digest is that of <b>desc</b>. */
static int
signed_desc_digest_is_recognized(signed_descriptor_t *desc)
{
const routerstatus_t *rs;
- networkstatus_t *consensus = networkstatus_get_latest_consensus();
+ networkstatus_t *consensus = networkstatus_get_latest_consensus_by_flavor(
+ FLAV_NS);
if (consensus) {
rs = networkstatus_vote_find_entry(consensus, desc->identity_digest);