aboutsummaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2006-02-19 22:02:02 +0000
committerRoger Dingledine <arma@torproject.org>2006-02-19 22:02:02 +0000
commit6a52867846bcd0b2f9606037eeed2a5e0cd472b9 (patch)
treee518442d897131bc835b1e61fcfc5cb30c0be152 /src/or/directory.c
parentc4f389420ca7b9afe502af50a7dcfc342f5a4f29 (diff)
downloadtor-6a52867846bcd0b2f9606037eeed2a5e0cd472b9.tar.gz
tor-6a52867846bcd0b2f9606037eeed2a5e0cd472b9.zip
New config options to address bug 251:
FetchServerDescriptors and FetchHidServDescriptors for whether to fetch server info and hidserv info or let the controller do it, and also PublishServerDescriptor and PublishHidServDescriptors. Add AllDirActionsPrivate undocumented option -- if you set it, you'll need the controller to bootstrap you enough to build your first circuits. svn:r6047
Diffstat (limited to 'src/or/directory.c')
-rw-r--r--src/or/directory.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index 7543144f0d..8ebe66e6d4 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -111,6 +111,8 @@ dir_policy_permits_address(uint32_t addr)
static int
purpose_is_private(uint8_t purpose)
{
+ if (get_options()->AllDirActionsPrivate)
+ return 1;
if (purpose == DIR_PURPOSE_FETCH_DIR ||
purpose == DIR_PURPOSE_UPLOAD_DIR ||
purpose == DIR_PURPOSE_FETCH_RUNNING_LIST ||
@@ -171,6 +173,10 @@ directory_get_from_dirserver(uint8_t purpose, const char *resource,
int need_v2_support = purpose == DIR_PURPOSE_FETCH_NETWORKSTATUS ||
purpose == DIR_PURPOSE_FETCH_SERVERDESC;
+ if (!options->FetchServerDescriptors &&
+ (need_v1_support || need_v2_support))
+ return;
+
if (directconn) {
if (prefer_authority) {
/* only ask authdirservers, and don't ask myself */