summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-05-11 13:20:57 -0400
committerNick Mathewson <nickm@torproject.org>2016-05-11 13:20:57 -0400
commite9e6a1f54781bab186e8c107c2e496d7786ab096 (patch)
tree1fe41a9f83f759098ccb246615bcb7040bf319bb /src
parent022d32252a34fc881d2f9ed661d659b752b83c34 (diff)
parent8d962233f65022dc7fbc0466c981e3e7f2aea0c8 (diff)
downloadtor-e9e6a1f54781bab186e8c107c2e496d7786ab096.tar.gz
tor-e9e6a1f54781bab186e8c107c2e496d7786ab096.zip
Merge branch 'maint-0.2.8'
Diffstat (limited to 'src')
-rw-r--r--src/or/routerlist.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index be2d6320fd..2149192509 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -912,14 +912,12 @@ authority_certs_fetch_missing(networkstatus_t *status, time_t now)
} SMARTLIST_FOREACH_END(d);
if (smartlist_len(fps) > 1) {
- static int want_auth = 0;
resource = smartlist_join_strings(fps, "", 0, NULL);
+ /* We want certs from mirrors, because they will almost always succeed.
+ */
directory_get_from_dirserver(DIR_PURPOSE_FETCH_CERTIFICATE, 0,
resource, PDS_RETRY_IF_NO_SERVERS,
- want_auth ? DL_WANT_AUTHORITY
- : DL_WANT_ANY_DIRSERVER);
- /* on failure, swap between using fallbacks and authorities */
- want_auth = !want_auth;
+ DL_WANT_ANY_DIRSERVER);
tor_free(resource);
}
/* else we didn't add any: they were all pending */
@@ -961,14 +959,12 @@ authority_certs_fetch_missing(networkstatus_t *status, time_t now)
} SMARTLIST_FOREACH_END(d);
if (smartlist_len(fp_pairs) > 1) {
- static int want_auth = 0;
resource = smartlist_join_strings(fp_pairs, "", 0, NULL);
+ /* We want certs from mirrors, because they will almost always succeed.
+ */
directory_get_from_dirserver(DIR_PURPOSE_FETCH_CERTIFICATE, 0,
resource, PDS_RETRY_IF_NO_SERVERS,
- want_auth ? DL_WANT_AUTHORITY
- : DL_WANT_ANY_DIRSERVER);
- /* on failure, swap between using fallbacks and authorities */
- want_auth = !want_auth;
+ DL_WANT_ANY_DIRSERVER);
tor_free(resource);
}
/* else they were all pending */