diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-08-12 12:44:06 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-08-12 12:44:06 -0400 |
commit | 06e82084d6829084a43453e2b810d45c4e794259 (patch) | |
tree | 419403d74261e6b821a092c0639057bd8af9217f | |
parent | a7e317927b9901a5b1d1d8de010093816da76425 (diff) | |
parent | ab8679f2fd3bb9ff7de093bf0bd42bff1a87d6aa (diff) | |
download | tor-06e82084d6829084a43453e2b810d45c4e794259.tar.gz tor-06e82084d6829084a43453e2b810d45c4e794259.zip |
Merge remote-tracking branch 'andrea/bug8625_prod'
-rw-r--r-- | changes/bug8625 | 4 | ||||
-rw-r--r-- | src/or/main.c | 14 | ||||
-rw-r--r-- | src/or/networkstatus.c | 3 | ||||
-rw-r--r-- | src/or/routerlist.c | 7 |
4 files changed, 14 insertions, 14 deletions
diff --git a/changes/bug8625 b/changes/bug8625 new file mode 100644 index 0000000000..90bb3c60d7 --- /dev/null +++ b/changes/bug8625 @@ -0,0 +1,4 @@ + o Bugfixes: + - Avoid resetting download status for consensuses hourly, and add a + SimulateDirDownloadFailures config option to test behavior when all + downloads from directory servers fail. Fixes bug 8625. diff --git a/src/or/main.c b/src/or/main.c index 76af910b3e..1455204210 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -169,9 +169,6 @@ static int can_complete_circuits = 0; /** How often do we check for router descriptors that we should download * when we have enough directory info? */ #define LAZY_DESCRIPTOR_RETRY_INTERVAL (60) -/** How often do we 'forgive' undownloadable router descriptors and attempt - * to download them again? */ -#define DESCRIPTOR_FAILURE_RESET_INTERVAL (60*60) /** Decides our behavior when no logs are configured/before any * logs have been configured. For 0, we log notice to stdout as normal. @@ -1247,7 +1244,6 @@ static int periodic_events_initialized = 0; CALLBACK(rotate_onion_key); CALLBACK(check_ed_keys); CALLBACK(launch_descriptor_fetches); -CALLBACK(reset_descriptor_failures); CALLBACK(rotate_x509_certificate); CALLBACK(add_entropy); CALLBACK(launch_reachability_tests); @@ -1279,7 +1275,6 @@ static periodic_event_item_t periodic_events[] = { CALLBACK(rotate_onion_key), CALLBACK(check_ed_keys), CALLBACK(launch_descriptor_fetches), - CALLBACK(reset_descriptor_failures), CALLBACK(rotate_x509_certificate), CALLBACK(add_entropy), CALLBACK(launch_reachability_tests), @@ -1606,15 +1601,6 @@ launch_descriptor_fetches_callback(time_t now, const or_options_t *options) } static int -reset_descriptor_failures_callback(time_t now, const or_options_t *options) -{ - (void)now; - (void)options; - router_reset_descriptor_download_failures(); - return DESCRIPTOR_FAILURE_RESET_INTERVAL; -} - -static int rotate_x509_certificate_callback(time_t now, const or_options_t *options) { static int first = 1; diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c index 0dfb8afcce..fe4b4562ff 100644 --- a/src/or/networkstatus.c +++ b/src/or/networkstatus.c @@ -147,6 +147,9 @@ networkstatus_reset_download_failures(void) { int i; + log_debug(LD_GENERAL, + "In networkstatus_reset_download_failures()"); + for (i=0; i < N_CONSENSUS_FLAVORS; ++i) download_status_reset(&consensus_dl_status[i]); diff --git a/src/or/routerlist.c b/src/or/routerlist.c index f87dbed145..d713fe4854 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -4465,6 +4465,10 @@ void routerlist_retry_directory_downloads(time_t now) { (void)now; + + log_debug(LD_GENERAL, + "In routerlist_retry_directory_downloads()"); + router_reset_status_download_failures(); router_reset_descriptor_download_failures(); reschedule_directory_downloads(); @@ -5277,6 +5281,9 @@ update_extrainfo_downloads(time_t now) void router_reset_descriptor_download_failures(void) { + log_debug(LD_GENERAL, + "In router_reset_descriptor_download_failures()"); + networkstatus_reset_download_failures(); last_descriptor_download_attempted = 0; if (!routerlist) |