aboutsummaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2012-01-25 20:18:51 -0500
committerAndrea Shepard <andrea@torproject.org>2013-02-02 08:04:20 -0800
commita8297cdbd3324ac707165ae9922ecf478c4608a1 (patch)
tree921123e6fd3e8b2838c9256579c52f49ec084805 /src/or/directory.c
parentacb43c0735af8a7cd9e8eb57bb8835b11a90a1be (diff)
downloadtor-a8297cdbd3324ac707165ae9922ecf478c4608a1.tar.gz
tor-a8297cdbd3324ac707165ae9922ecf478c4608a1.zip
use microdescriptors if *any* of our bridges can handle them
Now as we move into a future where most bridges can handle microdescs we will generally find ourselves using them, rather than holding back just because one of our bridges doesn't use them.
Diffstat (limited to 'src/or/directory.c')
-rw-r--r--src/or/directory.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index c101418446..c1bbe6bd81 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -472,12 +472,14 @@ directory_get_from_dirserver(uint8_t dir_purpose, uint8_t router_purpose,
if (options->UseBridges && type != BRIDGE_DIRINFO) {
/* We want to ask a running bridge for which we have a descriptor.
*
- * Be careful here: we should only ask questions that we know our
- * bridges can answer. So far we're solving that by backing off to
- * the behavior supported by our oldest bridge; see for example
- * any_bridges_dont_support_microdescriptors().
+ * When we ask choose_random_entry() for a bridge, we specify that
+ * we're going to be using it for a dir fetch: if any of our bridges
+ * can handle microdescriptor questions, we'll get one of the ones
+ * that can.
*/
- const node_t *node = choose_random_entry(NULL);
+ /* XXX024 Not all bridges handle conditional consensus downloading,
+ * so, for now, never assume the server supports that. -PP */
+ const node_t *node = choose_random_entry(NULL, 1);
if (node && node->ri) {
/* every bridge has a routerinfo. */
tor_addr_t addr;