aboutsummaryrefslogtreecommitdiff
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
parent77dea66e19404a4c07f0e738efb7710f542037ed (diff)
downloadtor-0c7fd8312341b349f93e97c915234b18d0d014ca.tar.gz
tor-0c7fd8312341b349f93e97c915234b18d0d014ca.zip
Move ConsensusParams to dirauth module.
-rw-r--r--src/app/config/config.c1
-rw-r--r--src/app/config/or_options_st.h4
-rw-r--r--src/feature/dirauth/dirauth_options.inc4
-rw-r--r--src/feature/dirauth/dirvote.c4
4 files changed, 6 insertions, 7 deletions
diff --git a/src/app/config/config.c b/src/app/config/config.c
index 4b47894cc1..65a0733e0d 100644
--- a/src/app/config/config.c
+++ b/src/app/config/config.c
@@ -371,7 +371,6 @@ static const config_var_t option_vars_[] = {
V(ClientTransportPlugin, LINELIST, NULL),
V(ClientUseIPv6, BOOL, "0"),
V(ClientUseIPv4, BOOL, "1"),
- V(ConsensusParams, STRING, NULL),
V(ConnLimit, POSINT, "1000"),
V(ConnDirectionStatistics, BOOL, "0"),
V(ConstrainedSockets, BOOL, "0"),
diff --git a/src/app/config/or_options_st.h b/src/app/config/or_options_st.h
index 09edc21a79..eaa32f9bf4 100644
--- a/src/app/config/or_options_st.h
+++ b/src/app/config/or_options_st.h
@@ -670,10 +670,6 @@ struct or_options_t {
/** Location of guardfraction file */
char *GuardfractionFile;
- /** Authority only: key=value pairs that we add to our networkstatus
- * consensus vote on the 'params' line. */
- char *ConsensusParams;
-
/** Authority only: minimum number of measured bandwidths we must see
* before we only believe measured bandwidths to assign flags. */
int MinMeasuredBWsForAuthToIgnoreAdvertised;
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;