summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-02-28 17:20:46 -0500
committerNick Mathewson <nickm@torproject.org>2013-03-01 10:17:07 -0500
commitad49abe5a147187582c8070b0b33d476f37fc792 (patch)
tree444d13d22d1b4447cbaa163c2bd802701b6b386a
parent9bc05c30d7b035766e89209e1075ee1bc66ccd4e (diff)
downloadtor-ad49abe5a147187582c8070b0b33d476f37fc792.tar.gz
tor-ad49abe5a147187582c8070b0b33d476f37fc792.zip
Fix bootstrapping with bridges by making is_dir_cache is set on them.
This fixes bug 8367, introduced in d7089ff228227259137b5a8b. Not in any released Tor.
-rw-r--r--src/or/entrynodes.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/entrynodes.c b/src/or/entrynodes.c
index 51c3a56742..e89eabce35 100644
--- a/src/or/entrynodes.c
+++ b/src/or/entrynodes.c
@@ -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) {