From 33d22e0f86927357f3e8a5216e7c74be782ddb0d Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Tue, 6 Jan 2009 07:22:07 +0000 Subject: [PATCH] backport r17920: bridge relays don't fetch descriptors much svn:r17947 --- ChangeLog | 7 +++++++ doc/TODO.020 | 2 +- src/or/dirserv.c | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9cd73f6cbe..9b1025548f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,13 @@ Changes in version 0.2.0.33 - 2009-01-?? combination. Now that we can have multiple OR connections between the same ORs, it is no longer possible to use addr:port to uniquely identify a connection. + - Bridge relays that had DirPort set to 0 would stop fetching + descriptors shortly after startup, and then briefly resume + after a new bandwidth test and/or after publishing a new bridge + descriptor. Bridge users that try to bootstrap from them would + get a recent networkstatus but would get descriptors from up to + 18 hours earlier, meaning most of the descriptors were obsolete + already. Reported by Tas; bugfix on 0.2.0.13-alpha. o Minor bugfixes: - Do not mark smartlist_bsearch_idx() function as ATTR_PURE. This bug diff --git a/doc/TODO.020 b/doc/TODO.020 index 3e9501386d..7d5c8c43e6 100644 --- a/doc/TODO.020 +++ b/doc/TODO.020 @@ -5,7 +5,7 @@ description of the patch.) Backport for 0.2.0: o r17891: Fix a fun OpenBSD warning. o r17892: Fix another fun OpenBSD warning. - - r17920: bridge relays don't fetch descriptors much + o r17920: bridge relays don't fetch descriptors much Backport for 0.2.0 once better tested: Xo r16621: Make some DNS code more robust (partial; see also libevent diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 655117ee70..e284b86283 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -1199,7 +1199,8 @@ directory_permits_controller_requests(or_options_t *options) int directory_too_idle_to_fetch_descriptors(or_options_t *options, time_t now) { - return !options->DirPort && !options->FetchUselessDescriptors && + return !directory_caches_dir_info(options) && + !options->FetchUselessDescriptors && rep_hist_circbuilding_dormant(now); }