diff options
author | George Kadianakis <desnacked@riseup.net> | 2017-10-03 14:16:49 +0300 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2017-10-03 14:41:18 +0300 |
commit | f2231306ba58cc5d9a5addb41eb7f287e3802746 (patch) | |
tree | a1d215c626c07c1d742e59d506da37ca63f52b80 /src/or | |
parent | c9729853a5ccfc15d206c43be8e15aea93ae19ee (diff) | |
download | tor-f2231306ba58cc5d9a5addb41eb7f287e3802746.tar.gz tor-f2231306ba58cc5d9a5addb41eb7f287e3802746.zip |
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.
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/nodelist.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/or/nodelist.c b/src/or/nodelist.c index 93dd43f3cd..ff26065ff2 100644 --- a/src/or/nodelist.c +++ b/src/or/nodelist.c @@ -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. */ |