summaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-12-15 21:39:38 +0000
committerNick Mathewson <nickm@torproject.org>2005-12-15 21:39:38 +0000
commit89eded7b175dc541a4c140587d48b01cc0e914eb (patch)
tree3f01f0c95f2e9ef36b09c146ceeecbc97008e733 /src/or/dirserv.c
parentcf8c70b79c69b0227f43e42b689da75379ac7069 (diff)
downloadtor-89eded7b175dc541a4c140587d48b01cc0e914eb.tar.gz
tor-89eded7b175dc541a4c140587d48b01cc0e914eb.zip
Add "panic" option to reject all servers not in fingerprint list.
svn:r5601
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r--src/or/dirserv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index 7fe5bcab3d..a787f919bf 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -280,6 +280,7 @@ dirserv_get_status_impl(const char *fp, const char *nickname,
const char **msg, int should_log)
{
fingerprint_entry_t *nn_ent = NULL, *fp_ent = NULL;
+ int reject_unlisted = get_options()->AuthDirRejectUnlisted;
if (!fingerprint_list)
fingerprint_list = smartlist_create();
@@ -327,7 +328,7 @@ dirserv_get_status_impl(const char *fp, const char *nickname,
return FP_INVALID;
}
if (!platform || tor_version_as_new_as(platform,"0.1.0.2-rc"))
- return FP_VALID;
+ return reject_unlisted ? FP_REJECT : FP_VALID;
else
return FP_INVALID;
if (should_log)