summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorteor <teor2345@gmail.com>2014-10-01 18:37:19 +1000
committerteor <teor2345@gmail.com>2014-10-08 05:36:54 +1100
commitc1dd43d823c74f59f8ba0eff90f6ddab6763f408 (patch)
tree1d4c88f7f6783df3fb36ebf10d89e92a1b16c99b
parent22a0708133f09d8703b3c64edfc55b5cdf904976 (diff)
downloadtor-c1dd43d823c74f59f8ba0eff90f6ddab6763f408.tar.gz
tor-c1dd43d823c74f59f8ba0eff90f6ddab6763f408.zip
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.
-rw-r--r--changes/bug13163-stop-AlternateAuthorities-always-using-default-authorities4
-rw-r--r--src/or/config.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/changes/bug13163-stop-AlternateAuthorities-always-using-default-authorities b/changes/bug13163-stop-AlternateAuthorities-always-using-default-authorities
new file mode 100644
index 0000000000..eeaca926a2
--- /dev/null
+++ b/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.
diff --git a/src/or/config.c b/src/or/config.c
index 921d032529..493cfcd2bc 100644
--- a/src/or/config.c
+++ b/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();