mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 15:43:32 +01:00
entrynodes: Move guard dirinfo check below path dirinfo check.
We do that because we want to use the path fraction dirinfo data in case we are missing primary guard dirinfo.
This commit is contained in:
parent
c9729853a5
commit
f2231306ba
@ -2300,16 +2300,6 @@ update_router_have_minimum_dir_info(void)
|
||||
|
||||
using_md = consensus->flavor == FLAV_MICRODESC;
|
||||
|
||||
{ /* Check entry guard dirinfo status */
|
||||
char *guard_error = entry_guards_get_dir_info_status_str();
|
||||
if (guard_error) {
|
||||
strlcpy(dir_info_status, guard_error, sizeof(dir_info_status));
|
||||
tor_free(guard_error);
|
||||
res = 0;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
/* Check fraction of available paths */
|
||||
{
|
||||
char *status = NULL;
|
||||
@ -2334,6 +2324,17 @@ update_router_have_minimum_dir_info(void)
|
||||
res = 1;
|
||||
}
|
||||
|
||||
{ /* Check entry guard dirinfo status */
|
||||
char *guard_error = entry_guards_get_dir_info_status_str();
|
||||
if (guard_error) {
|
||||
strlcpy(dir_info_status, guard_error, sizeof(dir_info_status));
|
||||
tor_free(guard_error);
|
||||
res = 0;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
done:
|
||||
|
||||
/* If paths have just become available in this update. */
|
||||
|
Loading…
Reference in New Issue
Block a user