diff options
author | David Goulet <dgoulet@torproject.org> | 2021-11-05 10:44:10 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2021-11-05 10:44:10 -0400 |
commit | 77b265f96ee65871ae7ed3f54642878116c65ff4 (patch) | |
tree | 10b6fa4621ecf04d23fecd169c254f24623bd88f /src/feature | |
parent | fb6bba1e42c465ed5e93b1a194f259e4a1be9131 (diff) | |
parent | a7fe37f1fa7821d0bdbeabe480df8aba7dc1fded (diff) | |
download | tor-77b265f96ee65871ae7ed3f54642878116c65ff4.tar.gz tor-77b265f96ee65871ae7ed3f54642878116c65ff4.zip |
Merge branch 'maint-0.4.5' into maint-0.4.6
Diffstat (limited to 'src/feature')
-rw-r--r-- | src/feature/dirauth/dirvote.c | 12 | ||||
-rw-r--r-- | src/feature/dirauth/dirvote.h | 58 |
2 files changed, 5 insertions, 65 deletions
diff --git a/src/feature/dirauth/dirvote.c b/src/feature/dirauth/dirvote.c index ffaa78b997..fa906c0c3c 100644 --- a/src/feature/dirauth/dirvote.c +++ b/src/feature/dirauth/dirvote.c @@ -4800,16 +4800,14 @@ 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(DIRVOTE_RECOMMEND_RELAY_PROTO); + tor_strdup(protover_get_recommended_relay_protocols()); v3_out->recommended_client_protocols = - tor_strdup(DIRVOTE_RECOMMEND_CLIENT_PROTO); - - v3_out->required_relay_protocols = - tor_strdup(DIRVOTE_REQUIRE_RELAY_PROTO); + tor_strdup(protover_get_recommended_client_protocols()); v3_out->required_client_protocols = - tor_strdup(DIRVOTE_REQUIRE_CLIENT_PROTO); + tor_strdup(protover_get_required_client_protocols()); + v3_out->required_relay_protocols = + tor_strdup(protover_get_required_relay_protocols()); /* We are not allowed to vote to require anything we don't have. */ tor_assert(protover_all_supported(v3_out->required_relay_protocols, NULL)); diff --git a/src/feature/dirauth/dirvote.h b/src/feature/dirauth/dirvote.h index d6a2d9cc75..3420098315 100644 --- a/src/feature/dirauth/dirvote.h +++ b/src/feature/dirauth/dirvote.h @@ -268,64 +268,6 @@ STATIC int64_t extract_param_buggy(const char *params, const char *param_name, int64_t default_value); -/** The recommended relay protocols for this authority's votes. - * Recommending a new protocol causes old tor versions to log a warning. - */ -#define DIRVOTE_RECOMMEND_RELAY_PROTO \ - "Cons=2 " \ - "Desc=2 " \ - "DirCache=2 " \ - "HSDir=2 " \ - "HSIntro=4 " \ - "HSRend=2 " \ - "Link=4-5 " \ - "LinkAuth=3 " \ - "Microdesc=2 " \ - "Relay=2" - -/** The recommended client protocols for this authority's votes. - * Recommending a new protocol causes old tor versions to log a warning. - */ -#define DIRVOTE_RECOMMEND_CLIENT_PROTO \ - "Cons=2 " \ - "Desc=2 " \ - "DirCache=2 " \ - "HSDir=2 " \ - "HSIntro=4 " \ - "HSRend=2 " \ - "Link=4-5 " \ - "Microdesc=2 " \ - "Relay=2" - -/** The required relay protocols for this authority's votes. - * WARNING: Requiring a new protocol causes old tor versions to shut down. - * Requiring the wrong protocols can break the tor network. - * See Proposal 303: When and how to remove support for protocol versions. - */ -#define DIRVOTE_REQUIRE_RELAY_PROTO \ - "Cons=2 " \ - "Desc=2 " \ - "DirCache=2 " \ - "HSDir=2 " \ - "HSIntro=4 " \ - "HSRend=2 " \ - "Link=4-5 " \ - "LinkAuth=3 " \ - "Microdesc=2 " \ - "Relay=2" - -/** The required relay protocols for this authority's votes. - * WARNING: Requiring a new protocol causes old tor versions to shut down. - * Requiring the wrong protocols can break the tor network. - * See Proposal 303: When and how to remove support for protocol versions. - */ -#define DIRVOTE_REQUIRE_CLIENT_PROTO \ - "Cons=2 " \ - "Desc=2 " \ - "Link=4 " \ - "Microdesc=2 " \ - "Relay=2" - #endif /* defined(DIRVOTE_PRIVATE) */ #endif /* !defined(TOR_DIRVOTE_H) */ |