summaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-08-25 11:58:33 -0400
committerNick Mathewson <nickm@torproject.org>2016-09-26 10:56:50 -0700
commit84f913024d9ad87f676793367b54e6f95be05eda (patch)
treea4cf99f7a269d1802ef296e1913e87aaf06cfc83 /src/or/dirserv.c
parent07a9b795203fdf670832b2b9f9f9f5da5929c82e (diff)
downloadtor-84f913024d9ad87f676793367b54e6f95be05eda.tar.gz
tor-84f913024d9ad87f676793367b54e6f95be05eda.zip
Include protocol version lines in votes.
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r--src/or/dirserv.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index ff50ca4417..a4eb738a30 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -2908,6 +2908,21 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key,
v3_out->client_versions = client_versions;
v3_out->server_versions = server_versions;
+
+ /* These are hardwired to avoid disaster. */
+ v3_out->recommended_relay_protocols =
+ tor_strdup("DirCache=1 HSDir=1 Desc=1-2 Cons=1-2 Microdesc=1-2 "
+ "HSMid=1 Link=3-4 LinkAuth=1 Relay=1-2");
+ v3_out->recommended_client_protocols =
+ tor_strdup("DirCache=1 HSDir=1 Desc=1 Cons=1 Microdesc=1 "
+ "HSMid=1 Link=4 LinkAuth=1 Relay=2");
+ v3_out->required_relay_protocols =
+ tor_strdup("DirCache=1 HSDir=1 Desc=1 Cons=1 Microdesc=1 "
+ "HSMid=1 Link=3-4 LinkAuth=1 Relay=1-2");
+ v3_out->required_client_protocols =
+ tor_strdup("DirCache=1 HSDir=1 Desc=1 Cons=1 Microdesc=1 "
+ "HSMid=1 Link=1 LinkAuth=1 Relay=2");
+
v3_out->package_lines = smartlist_new();
{
config_line_t *cl;