diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-12-11 16:43:41 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-12-11 16:43:41 -0500 |
commit | ae608408e93296dfe123c69fbd3dae02d50d9c66 (patch) | |
tree | 3ed7af9827bcac03d9921c91b9f9dc1b427e46aa /src | |
parent | 8e100d1a17d497d99c10c13db53442ff9e56063f (diff) | |
parent | 43c34dfca04f4e10c85ed567f383ee5442be1a80 (diff) | |
download | tor-ae608408e93296dfe123c69fbd3dae02d50d9c66.tar.gz tor-ae608408e93296dfe123c69fbd3dae02d50d9c66.zip |
Merge remote-tracking branch 'asn/bug23862_031' into maint-0.3.1
Diffstat (limited to 'src')
-rw-r--r-- | src/or/directory.c | 4 | ||||
-rw-r--r-- | src/or/main.c | 18 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index 9494cf02ba..f54bf176ce 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -2592,11 +2592,11 @@ handle_response_fetch_consensus(dir_connection_t *conn, /* If we launched other fetches for this consensus, cancel them. */ connection_dir_close_consensus_fetches(conn, flavname); - /* launches router downloads as needed */ + /* update the list of routers and directory guards */ routers_update_all_from_networkstatus(now, 3); update_microdescs_from_networkstatus(now); - update_microdesc_downloads(now); directory_info_has_arrived(now, 0, 0); + if (authdir_mode_v3(get_options())) { sr_act_post_consensus( networkstatus_get_latest_consensus_by_flavor(FLAV_NS)); diff --git a/src/or/main.c b/src/or/main.c index 7b1f4975f7..0d91803d4e 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -968,6 +968,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); @@ -981,15 +990,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) |