summaryrefslogtreecommitdiff
path: root/src/feature/dirauth/dirauth_options.inc
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-12-15 11:46:55 -0500
committerNick Mathewson <nickm@torproject.org>2019-12-19 07:54:56 -0500
commitffa3499d81823eb21811a479c31b59f1bfb5bc61 (patch)
tree3841d1247c282792a1f4c3952ab09c305b66e718 /src/feature/dirauth/dirauth_options.inc
parent419ba97df5bd168bf773478270c0043f20328e15 (diff)
downloadtor-ffa3499d81823eb21811a479c31b59f1bfb5bc61.tar.gz
tor-ffa3499d81823eb21811a479c31b59f1bfb5bc61.zip
Add config object for dirauth; move one option there.
I've chosen the "AuthDirMaxServersPerAddr" option here for simplicity, since it is used literally nowhere else besides the dirauth module. Once we have all the infrastructure in place for this, we can move more options into this structure.
Diffstat (limited to 'src/feature/dirauth/dirauth_options.inc')
-rw-r--r--src/feature/dirauth/dirauth_options.inc18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/feature/dirauth/dirauth_options.inc b/src/feature/dirauth/dirauth_options.inc
new file mode 100644
index 0000000000..6b66f1e289
--- /dev/null
+++ b/src/feature/dirauth/dirauth_options.inc
@@ -0,0 +1,18 @@
+/* Copyright (c) 2001 Matej Pfajfar.
+ * Copyright (c) 2001-2004, Roger Dingledine.
+ * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
+ * Copyright (c) 2007-2019, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+/**
+ * @file dirauth_options.inc
+ * @brief Declare configuration options for the crypto_ops module.
+ **/
+
+/** Holds configuration about our directory authority options. */
+BEGIN_CONF_STRUCT(dirauth_options_t)
+
+/** Do not permit more than this number of servers per IP address. */
+CONF_VAR(AuthDirMaxServersPerAddr, POSINT, 0, "2")
+
+END_CONF_STRUCT(dirauth_options_t)