mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-09-20 21:16:22 +02:00
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
This commit is contained in:
parent
9592797cf3
commit
cbc70437a7
@ -971,6 +971,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);
|
||||
@ -984,15 +993,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)
|
||||
|
Loading…
Reference in New Issue
Block a user