diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-05-11 13:20:51 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-05-11 13:20:51 -0400 |
commit | 8d962233f65022dc7fbc0466c981e3e7f2aea0c8 (patch) | |
tree | 3baada7455fb9154bd080018a93e9c941f1bbcd3 | |
parent | 24fbb9a81b19cc20df9a204d3203d1b914fb267d (diff) | |
parent | 797ece042d9666beae3ffc801b148e8bebcd88c0 (diff) | |
download | tor-8d962233f65022dc7fbc0466c981e3e7f2aea0c8.tar.gz tor-8d962233f65022dc7fbc0466c981e3e7f2aea0c8.zip |
Merge remote-tracking branch 'teor/bug18816_simplify' into maint-0.2.8
-rw-r--r-- | changes/bug18816 | 2 | ||||
-rw-r--r-- | src/or/routerlist.c | 16 |
2 files changed, 6 insertions, 12 deletions
diff --git a/changes/bug18816 b/changes/bug18816 index 05455120c0..7265f5ab3f 100644 --- a/changes/bug18816 +++ b/changes/bug18816 @@ -1,6 +1,4 @@ o Minor bugfix (bootstrap): - Consistently use the consensus download schedule for authority certificates. - - When downloading authority certificates fails, switch from - using a fallback to using an authority. Resolves ticket 18816; fix on fddb814fe in 0.2.4.13-alpha. diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 31693437e1..d40d704a1d 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 */ |