]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Stop using default authorities with both Alternate Dir and Bridge Authority
authorteor <teor2345@gmail.com>
Wed, 1 Oct 2014 08:37:19 +0000 (18:37 +1000)
committerteor <teor2345@gmail.com>
Tue, 7 Oct 2014 18:36:54 +0000 (05:36 +1100)
Stop using the default authorities in networks which provide both
AlternateDirAuthority and AlternateBridgeAuthority.

This bug occurred due to an ambiguity around the use of NO_DIRINFO.
(Does it mean "any" or "none"?)

Partially fixes bug 13163.

changes/bug13163-stop-AlternateAuthorities-always-using-default-authorities [new file with mode: 0644]
src/or/config.c

diff --git a/changes/bug13163-stop-AlternateAuthorities-always-using-default-authorities b/changes/bug13163-stop-AlternateAuthorities-always-using-default-authorities
new file mode 100644 (file)
index 0000000..eeaca92
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor bugfixes:
+    - Stop using the default authorities in networks which provide both
+      AlternateDirAuthority and AlternateBridgeAuthority.
+      Partially fixes bug 13163.
index 921d03252972e2527f1381cb666591604c5f9262..493cfcd2bcc2d1252fe37b749ff201bcb73b48ef 100644 (file)
@@ -959,7 +959,10 @@ consider_adding_dir_servers(const or_options_t *options,
       type |= BRIDGE_DIRINFO;
     if (!options->AlternateDirAuthority)
       type |= V3_DIRINFO | EXTRAINFO_DIRINFO | MICRODESC_DIRINFO;
-    add_default_trusted_dir_authorities(type);
+    /* if type == NO_DIRINFO, we don't want to add any of the
+     * default authorities, because we've replaced them all */
+    if (type != NO_DIRINFO)
+      add_default_trusted_dir_authorities(type);
   }
   if (!options->FallbackDir)
     add_default_fallback_dir_servers();