]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix bootstrapping with bridges by making is_dir_cache is set on them.
authorNick Mathewson <nickm@torproject.org>
Thu, 28 Feb 2013 22:20:46 +0000 (17:20 -0500)
committerNick Mathewson <nickm@torproject.org>
Fri, 1 Mar 2013 15:17:07 +0000 (10:17 -0500)
This fixes bug 8367, introduced in d7089ff228227259137b5a8b. Not in
any released Tor.

src/or/entrynodes.c

index 51c3a567420dbfcfd78e17e7ff4a082f99a73825..e89eabce35cb8ea7257067f8c94e92189279885e 100644 (file)
@@ -133,6 +133,8 @@ entry_guard_set_status(entry_guard_t *e, const node_t *node,
   if (node) {
     int is_dir = node_is_dir(node) && node->rs &&
       node->rs->version_supports_microdesc_cache;
+    if (options->UseBridges && node_is_a_configured_bridge(node))
+      is_dir = 1;
     if (e->is_dir_cache != is_dir) {
       e->is_dir_cache = is_dir;
       changed = 1;
@@ -354,6 +356,8 @@ add_an_entry_guard(const node_t *chosen, int reset_status, int prepend,
       }
       entry->is_dir_cache = node->rs &&
         node->rs->version_supports_microdesc_cache;
+      if (get_options()->UseBridges && node_is_a_configured_bridge(node))
+        entry->is_dir_cache = 1;
       return NULL;
     }
   } else if (!for_directory) {