소스 검색

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 12 년 전
부모
커밋
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;
       type |= BRIDGE_DIRINFO;
     if (!options->AlternateDirAuthority)
     if (!options->AlternateDirAuthority)
       type |= V3_DIRINFO | EXTRAINFO_DIRINFO | MICRODESC_DIRINFO;
       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)
   if (!options->FallbackDir)
     add_default_fallback_dir_servers();
     add_default_fallback_dir_servers();