summaryrefslogtreecommitdiff
path: root/src/feature/dirauth
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-12-19 09:46:14 -0500
committerNick Mathewson <nickm@torproject.org>2019-12-19 09:46:14 -0500
commit0c7fd8312341b349f93e97c915234b18d0d014ca (patch)
treef938d887103968eb519924f5585a6d0cd6e518cb /src/feature/dirauth
parent77dea66e19404a4c07f0e738efb7710f542037ed (diff)
downloadtor-0c7fd8312341b349f93e97c915234b18d0d014ca.tar.gz
tor-0c7fd8312341b349f93e97c915234b18d0d014ca.zip
Move ConsensusParams to dirauth module.
Diffstat (limited to 'src/feature/dirauth')
-rw-r--r--src/feature/dirauth/dirauth_options.inc4
-rw-r--r--src/feature/dirauth/dirvote.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/feature/dirauth/dirauth_options.inc b/src/feature/dirauth/dirauth_options.inc
index f0aadb006f..f3d8e35b35 100644
--- a/src/feature/dirauth/dirauth_options.inc
+++ b/src/feature/dirauth/dirauth_options.inc
@@ -44,6 +44,10 @@ CONF_VAR(AuthDirSharedRandomness, BOOL, 0, "1")
/* NOTE: remove this option someday. */
CONF_VAR(AuthDirTestEd25519LinkKeys, BOOL, 0, "1")
+/** Authority only: key=value pairs that we add to our networkstatus
+ * consensus vote on the 'params' line. */
+CONF_VAR(ConsensusParams, STRING, 0, NULL)
+
/** As directory authority, accept hidden service directories after what
* time? */
CONF_VAR(MinUptimeHidServDirectoryV2, INTERVAL, 0, "96 hours")
diff --git a/src/feature/dirauth/dirvote.c b/src/feature/dirauth/dirvote.c
index 7caa6bf30d..1fd438b7db 100644
--- a/src/feature/dirauth/dirvote.c
+++ b/src/feature/dirauth/dirvote.c
@@ -4664,10 +4664,10 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key,
smartlist_add_strdup(v3_out->known_flags, "BadExit");
smartlist_sort_strings(v3_out->known_flags);
- if (options->ConsensusParams) {
+ if (d_options->ConsensusParams) {
v3_out->net_params = smartlist_new();
smartlist_split_string(v3_out->net_params,
- options->ConsensusParams, NULL, 0, 0);
+ d_options->ConsensusParams, NULL, 0, 0);
smartlist_sort_strings(v3_out->net_params);
}
v3_out->bw_file_headers = bw_file_headers;