[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Stop using default authorities with both Alternate Dir and Bridge Authority



commit c1dd43d823c74f59f8ba0eff90f6ddab6763f408
Author: teor <teor2345@xxxxxxxxx>
Date:   Wed Oct 1 18:37:19 2014 +1000

    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.
---
 ...163-stop-AlternateAuthorities-always-using-default-authorities |    4 ++++
 src/or/config.c                                                   |    5 ++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

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 0000000..eeaca92
--- /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 921d032..493cfcd 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();



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits