浏览代码

Stop using default authorities with both Alternate Dir and Bridge Authority

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.
teor 11 年之前
父节点
当前提交
c1dd43d823
共有 2 个文件被更改,包括 8 次插入1 次删除
  1. 4 0
      changes/bug13163-stop-AlternateAuthorities-always-using-default-authorities
  2. 4 1
      src/or/config.c

+ 4 - 0
changes/bug13163-stop-AlternateAuthorities-always-using-default-authorities

@@ -0,0 +1,4 @@
+  o Minor bugfixes:
+    - Stop using the default authorities in networks which provide both
+      AlternateDirAuthority and AlternateBridgeAuthority.
+      Partially fixes bug 13163.

+ 4 - 1
src/or/config.c

@@ -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();