From eb5a262a15c05bee8e64e66c93f3a6387c0c5cd6 Mon Sep 17 00:00:00 2001 From: "teor (Tim Wilson-Brown)" Date: Thu, 24 Mar 2016 21:56:13 +1100 Subject: Code indentation whitespace-only fix --- src/or/routerlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/or/routerlist.c b/src/or/routerlist.c index bc5e2e9133..ecfcb9bd08 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -1861,7 +1861,7 @@ router_pick_trusteddirserver_impl(const smartlist_t *sourcelist, !router_supports_extrainfo(d->digest, 1)) continue; if (requireother && me && router_digest_is_me(d->digest)) - continue; + continue; if (try_excluding && routerset_contains_routerstatus(options->ExcludeNodes, &d->fake_status, -1)) { -- cgit v1.2.3-54-g00ecf From b1569e39c87a32b64fe06702c1f18b43eb35f5ad Mon Sep 17 00:00:00 2001 From: "teor (Tim Wilson-Brown)" Date: Thu, 24 Mar 2016 22:03:58 +1100 Subject: Check if fallbacks support extrainfo descriptors before requesting them When requesting extrainfo descriptors from a trusted directory server, check whether it is an authority or a fallback directory which supports extrainfo descriptors. Fixes bug 18489; bugfix on 90f6071d8d in tor-0.2.4.7-alpha. Reported by "atagar", patch by "teor". --- changes/bug18489 | 6 ++++++ src/or/routerlist.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 changes/bug18489 diff --git a/changes/bug18489 b/changes/bug18489 new file mode 100644 index 0000000000..d8c171ab74 --- /dev/null +++ b/changes/bug18489 @@ -0,0 +1,6 @@ + o Minor bugfixes (fallback directory mirrors): + - When requesting extrainfo descriptors from a trusted directory + server, check whether it is an authority or a fallback directory + which supports extrainfo descriptors. + Fixes bug 18489; bugfix on 90f6071d8d in tor-0.2.4.7-alpha. + Reported by "atagar", patch by "teor". diff --git a/src/or/routerlist.c b/src/or/routerlist.c index ecfcb9bd08..7ec84f038a 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -1857,8 +1857,10 @@ router_pick_trusteddirserver_impl(const smartlist_t *sourcelist, if (!d->is_running) continue; if ((type & d->type) == 0) continue; + int is_trusted_extrainfo = router_digest_is_trusted_dir_type( + d->digest, EXTRAINFO_DIRINFO); if ((type & EXTRAINFO_DIRINFO) && - !router_supports_extrainfo(d->digest, 1)) + !router_supports_extrainfo(d->digest, is_trusted_extrainfo)) continue; if (requireother && me && router_digest_is_me(d->digest)) continue; -- cgit v1.2.3-54-g00ecf