summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Shepard <andrea@torproject.org>2013-03-01 01:59:25 -0800
committerNick Mathewson <nickm@torproject.org>2013-03-01 10:17:07 -0500
commit74c33945e3c8c441111f0cb3dd0e5097ad2155f5 (patch)
treef2cbbaf04459e82734bd104e21b1d4bf77485eaf
parentad49abe5a147187582c8070b0b33d476f37fc792 (diff)
downloadtor-74c33945e3c8c441111f0cb3dd0e5097ad2155f5.tar.gz
tor-74c33945e3c8c441111f0cb3dd0e5097ad2155f5.zip
Correctly set entry->is_dir_cache when adding an entry guard for the first time
(Second part of a bug8367 fix. -NM)
-rw-r--r--src/or/entrynodes.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/entrynodes.c b/src/or/entrynodes.c
index e89eabce35..5d356b6231 100644
--- a/src/or/entrynodes.c
+++ b/src/or/entrynodes.c
@@ -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