summaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2008-03-18 22:54:37 +0000
committerRoger Dingledine <arma@torproject.org>2008-03-18 22:54:37 +0000
commitfc3f30c95ed866fc5b97ca05cdde0fd75b367e6a (patch)
tree4f258adfbb19067af4dbdc3aaee4c24febc23bfa /src/or/directory.c
parent6c37f1e309359f5f7d01b0f8cd9a2e1bc072ac54 (diff)
downloadtor-fc3f30c95ed866fc5b97ca05cdde0fd75b367e6a.tar.gz
tor-fc3f30c95ed866fc5b97ca05cdde0fd75b367e6a.zip
Stop using encrypted dir connections for direct dir requests when you're
acting like a dir mirror. This should reduce load on the directory authorities, and also will remove the ugly "We just marked ourself as down" warnings my authorities keep getting. svn:r14114
Diffstat (limited to 'src/or/directory.c')
-rw-r--r--src/or/directory.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index 8b9d4d94b3..fcd5062b47 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -625,9 +625,10 @@ directory_command_should_use_begindir(or_options_t *options, uint32_t addr,
{
if (!or_port)
return 0; /* We don't know an ORPort -- no chance. */
- if (!anonymized_connection &&
- !fascist_firewall_allows_address_or(addr, or_port))
- return 0; /* We're firewalled -- also no chance. */
+ if (!anonymized_connection)
+ if (!fascist_firewall_allows_address_or(addr, or_port) ||
+ directory_fetches_from_authorities(options))
+ return 0; /* We're firewalled or are acting like a relay -- also no. */
if (!options->TunnelDirConns &&
router_purpose != ROUTER_PURPOSE_BRIDGE)
return 0; /* We prefer to avoid using begindir conns. Fine. */