summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Ransom <rransom.8774@gmail.com>2011-04-20 15:20:10 -0700
committerNick Mathewson <nickm@torproject.org>2011-04-28 18:10:16 -0400
commitdf5c7fedbd938c5d4634eadcf53693e07d2c8182 (patch)
treee7d0f75be0f9d9a9c68ae09139477bda6755c8ee /src
parent2dc9546eef6d748245d90b288f28ace1aa9b6f14 (diff)
downloadtor-df5c7fedbd938c5d4634eadcf53693e07d2c8182.tar.gz
tor-df5c7fedbd938c5d4634eadcf53693e07d2c8182.zip
Don't allow v0 HS auths to act as clients
A v0 HS authority stores v0 HS descriptors in the same descriptor cache that its HS client functionality uses. Thus, if the HS authority operator clears its client HS descriptor cache, ALL v0 HS descriptors will be lost. That would be bad.
Diffstat (limited to 'src')
-rw-r--r--src/or/config.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c
index f003e4d296..9384b3a68a 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -3078,6 +3078,10 @@ options_validate(or_options_t *old_options, or_options_t *options,
REJECT("FetchDirInfoExtraEarly requires that you also set "
"FetchDirInfoEarly");
+ if (options->HSAuthoritativeDir && proxy_mode(options))
+ REJECT("Running as authoritative v0 HS directory, but also configured "
+ "as a client.");
+
if (options->ConnLimit <= 0) {
tor_asprintf(msg,
"ConnLimit must be greater than 0, but was set to %d",