diff options
author | Roger Dingledine <arma@torproject.org> | 2009-09-15 04:40:08 -0400 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2009-09-15 04:40:08 -0400 |
commit | 40bcab1faf26dd26de48b5ea6c1846c562a11f9d (patch) | |
tree | bf9efa03125ade36b479340b7dc4648219838fdf /src/or | |
parent | 56c6d78520a98fb643e67b80b9192a2875f95e29 (diff) | |
download | tor-40bcab1faf26dd26de48b5ea6c1846c562a11f9d.tar.gz tor-40bcab1faf26dd26de48b5ea6c1846c562a11f9d.zip |
ConsensusParams config option lists key=value params
finishes the authority-operator interface side of proposal 167.
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/config.c | 1 | ||||
-rw-r--r-- | src/or/dirserv.c | 7 | ||||
-rw-r--r-- | src/or/or.h | 4 |
3 files changed, 12 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c index 0ec3990088..d830229d3b 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -168,6 +168,7 @@ static config_var_t _option_vars[] = { V(CircuitIdleTimeout, INTERVAL, "1 hour"), V(ClientDNSRejectInternalAddresses, BOOL,"1"), V(ClientOnly, BOOL, "0"), + V(ConsensusParams, STRING, NULL), V(ConnLimit, UINT, "1000"), V(ConstrainedSockets, BOOL, "0"), V(ConstrainedSockSize, MEMUNIT, "8192"), diff --git a/src/or/dirserv.c b/src/or/dirserv.c index c4a339738e..6a88286b10 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -2553,6 +2553,13 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_env_t *private_key, } smartlist_sort_strings(v3_out->known_flags); + if (options->ConsensusParams) { + v3_out->net_params = smartlist_create(); + smartlist_split_string(v3_out->net_params, + options->ConsensusParams, NULL, 0, 0); + smartlist_sort_strings(v3_out->net_params); + } + voter = tor_malloc_zero(sizeof(networkstatus_voter_info_t)); voter->nickname = tor_strdup(options->Nickname); memcpy(voter->identity_digest, identity_digest, DIGEST_LEN); diff --git a/src/or/or.h b/src/or/or.h index dd940273b2..c93b8ed0fd 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -2587,6 +2587,10 @@ typedef struct { /** Location of bandwidth measurement file */ char *V3BandwidthsFile; + /** Authority only: key=value pairs that we add to our networkstatus + * consensus vote on the 'params' line. */ + char *ConsensusParams; + /** The length of time that we think an initial consensus should be fresh. * Only altered on testing networks. */ int TestingV3AuthInitialVotingInterval; |