aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2017-10-25 19:18:25 +0300
committerGeorge Kadianakis <desnacked@riseup.net>2017-12-01 14:09:29 +0200
commit210f0c24f039aa6d46b9396ec6bb13ff575a9e79 (patch)
treeedc0098cbb6bbd340b04e3b7d3d98d147896c5be /src
parent766d0a2d98591ed840cce42710c5a59a2e7dc731 (diff)
downloadtor-210f0c24f039aa6d46b9396ec6bb13ff575a9e79.tar.gz
tor-210f0c24f039aa6d46b9396ec6bb13ff575a9e79.zip
Update entry guard state whenever we download a consensus.
Update guard state even if we don't have enough dirinfo since that actually affects the future download of dirinfos. Fixes #23862 on 0.3.0.1-alpha
Diffstat (limited to 'src')
-rw-r--r--src/or/main.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 478316b79f..1d899349ef 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -965,6 +965,15 @@ directory_info_has_arrived(time_t now, int from_cache, int suppress_logs)
{
const or_options_t *options = get_options();
+ /* if we have enough dir info, then update our guard status with
+ * whatever we just learned. */
+ int invalidate_circs = guards_update_all();
+
+ if (invalidate_circs) {
+ circuit_mark_all_unused_circs();
+ circuit_mark_all_dirty_circs_as_unusable();
+ }
+
if (!router_have_minimum_dir_info()) {
int quiet = suppress_logs || from_cache ||
directory_too_idle_to_fetch_descriptors(options, now);
@@ -978,15 +987,6 @@ directory_info_has_arrived(time_t now, int from_cache, int suppress_logs)
update_all_descriptor_downloads(now);
}
- /* if we have enough dir info, then update our guard status with
- * whatever we just learned. */
- int invalidate_circs = guards_update_all();
-
- if (invalidate_circs) {
- circuit_mark_all_unused_circs();
- circuit_mark_all_dirty_circs_as_unusable();
- }
-
/* Don't even bother trying to get extrainfo until the rest of our
* directory info is up-to-date */
if (options->DownloadExtraInfo)