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 | 1c77deca4f8e8027eaf130b6454af758e4d9ccc4 (patch) | |
tree | 9cef6f8a40681ed37364bb9a68f665fb80d737b0 /src/feature/dirauth | |
parent | c363e2017f28d1bd8fe8a7bb3ad8f80a396f9b5c (diff) | |
parent | 77b265f96ee65871ae7ed3f54642878116c65ff4 (diff) | |
download | tor-1c77deca4f8e8027eaf130b6454af758e4d9ccc4.tar.gz tor-1c77deca4f8e8027eaf130b6454af758e4d9ccc4.zip |
Merge branch 'maint-0.4.6'
Diffstat (limited to 'src/feature/dirauth')
-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 2f7fa80ae7..cdd2c132ef 100644 --- a/src/feature/dirauth/dirvote.c +++ b/src/feature/dirauth/dirvote.c @@ -4841,16 +4841,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 9cb7fe1694..64aaec116e 100644 --- a/src/feature/dirauth/dirvote.h +++ b/src/feature/dirauth/dirvote.h @@ -272,64 +272,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) */ |