]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Correctly set entry->is_dir_cache when adding an entry guard for the first time
authorAndrea Shepard <andrea@torproject.org>
Fri, 1 Mar 2013 09:59:25 +0000 (01:59 -0800)
committerNick Mathewson <nickm@torproject.org>
Fri, 1 Mar 2013 15:17:07 +0000 (10:17 -0500)
                    (Second part of a bug8367 fix. -NM)

src/or/entrynodes.c

index e89eabce35cb8ea7257067f8c94e92189279885e..5d356b6231ba54b60c046d28fd0765b0d90e6ac9 100644 (file)
@@ -381,6 +381,8 @@ add_an_entry_guard(const node_t *chosen, int reset_status, int prepend,
   memcpy(entry->identity, node->identity, DIGEST_LEN);
   entry->is_dir_cache = node_is_dir(node) &&
     node->rs && node->rs->version_supports_microdesc_cache;
+  if (get_options()->UseBridges && node_is_a_configured_bridge(node))
+    entry->is_dir_cache = 1;
 
   /* Choose expiry time smudged over the past month. The goal here
    * is to a) spread out when Tor clients rotate their guards, so they