]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Check if fallbacks support extrainfo descriptors before requesting them
authorteor (Tim Wilson-Brown) <teor2345@gmail.com>
Thu, 24 Mar 2016 11:03:58 +0000 (22:03 +1100)
committerteor (Tim Wilson-Brown) <teor2345@gmail.com>
Thu, 24 Mar 2016 11:03:58 +0000 (22:03 +1100)
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 [new file with mode: 0644]
src/or/routerlist.c

diff --git a/changes/bug18489 b/changes/bug18489
new file mode 100644 (file)
index 0000000..d8c171a
--- /dev/null
@@ -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".
index ecfcb9bd086d291505bdd5dccf47307560b7e560..7ec84f038a6a6b6266778a2d4263f49d5d445bee 100644 (file)
@@ -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;