aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerlist.c
diff options
context:
space:
mode:
authorKarsten Loesing <karsten.loesing@gmx.net>2014-05-05 15:31:52 +0200
committerKarsten Loesing <karsten.loesing@gmx.net>2014-05-05 15:31:52 +0200
commit5e9bd1b5db1815698f7aed6caf5df9587185a8d1 (patch)
tree1866ae7d54e804efc74e4af1c38fae625cfbd2e6 /src/or/routerlist.c
parent8a173635bcd85ad7375d996fb39efeaddd8c611d (diff)
downloadtor-5e9bd1b5db1815698f7aed6caf5df9587185a8d1.tar
tor-5e9bd1b5db1815698f7aed6caf5df9587185a8d1.tar.gz
Believe that v3 dirauths always serve extra infos.
Clients should always believe that v3 directory authorities serve extra-info documents, regardless of whether their server descriptor contains a "caches-extra-info" line or not. Fixes part of #11683.
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r--src/or/routerlist.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 8f3477a4a..2c0f19367 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -1438,7 +1438,7 @@ router_pick_directory_server_impl(dirinfo_type_t type, int flags)
/* Find all the running dirservers we know about. */
SMARTLIST_FOREACH_BEGIN(nodelist_get_list(), const node_t *, node) {
- int is_trusted;
+ int is_trusted, is_trusted_extrainfo;
int is_overloaded;
tor_addr_t addr;
const routerstatus_t *status = node->rs;
@@ -1453,8 +1453,10 @@ router_pick_directory_server_impl(dirinfo_type_t type, int flags)
if (requireother && router_digest_is_me(node->identity))
continue;
is_trusted = router_digest_is_trusted_dir(node->identity);
+ is_trusted_extrainfo = router_digest_is_trusted_dir_type(
+ node->identity, EXTRAINFO_DIRINFO);
if ((type & EXTRAINFO_DIRINFO) &&
- !router_supports_extrainfo(node->identity, 0))
+ !router_supports_extrainfo(node->identity, is_trusted_extrainfo))
continue;
if ((type & MICRODESC_DIRINFO) && !is_trusted &&
!node->rs->version_supports_microdesc_cache)