diff options
author | teor <teor@riseup.net> | 2020-05-15 14:59:10 +1000 |
---|---|---|
committer | teor <teor@riseup.net> | 2020-05-15 14:59:10 +1000 |
commit | a702e92c82c627280c4c9f1d2f3b183b01d78226 (patch) | |
tree | 4ff33b25672ece06fcc299ee092a1c982841f021 /src/core/or/versions.c | |
parent | c39394afa2cb683c460902727683255e5981234e (diff) | |
download | tor-a702e92c82c627280c4c9f1d2f3b183b01d78226.tar.gz tor-a702e92c82c627280c4c9f1d2f3b183b01d78226.zip |
protover: Add defines for recent protocol versions
Also update the protover/supported_protocols test.
Part of 33226.
Diffstat (limited to 'src/core/or/versions.c')
-rw-r--r-- | src/core/or/versions.c | 43 |
1 files changed, 27 insertions, 16 deletions
diff --git a/src/core/or/versions.c b/src/core/or/versions.c index a8dfe7e61c..410a009ba7 100644 --- a/src/core/or/versions.c +++ b/src/core/or/versions.c @@ -435,34 +435,45 @@ memoize_protover_summary(protover_summary_flags_t *out, memset(out, 0, sizeof(*out)); out->protocols_known = 1; + out->supports_ed25519_link_handshake_compat = + protocol_list_supports_protocol(protocols, PRT_LINKAUTH, + PROTOVER_LINKAUTH_ED25519_HANDSHAKE); + out->supports_ed25519_link_handshake_any = + protocol_list_supports_protocol_or_later( + protocols, + PRT_LINKAUTH, + PROTOVER_LINKAUTH_ED25519_HANDSHAKE); + out->supports_extend2_cells = - protocol_list_supports_protocol(protocols, PRT_RELAY, 2); + protocol_list_supports_protocol(protocols, PRT_RELAY, + PROTOVER_RELAY_EXTEND2); out->supports_accepting_ipv6_extends = ( - protocol_list_supports_protocol(protocols, PRT_RELAY, 2) || - protocol_list_supports_protocol(protocols, PRT_RELAY, 3)); + protocol_list_supports_protocol(protocols, PRT_RELAY, + PROTOVER_RELAY_ACCEPT_IPV6) || + protocol_list_supports_protocol(protocols, PRT_RELAY, + PROTOVER_RELAY_EXTEND_IPV6)); out->supports_initiating_ipv6_extends = - protocol_list_supports_protocol(protocols, PRT_RELAY, 3); + protocol_list_supports_protocol(protocols, PRT_RELAY, + PROTOVER_RELAY_EXTEND_IPV6); out->supports_canonical_ipv6_conns = - protocol_list_supports_protocol(protocols, PRT_RELAY, 3); - - out->supports_ed25519_link_handshake_compat = - protocol_list_supports_protocol(protocols, PRT_LINKAUTH, 3); - out->supports_ed25519_link_handshake_any = - protocol_list_supports_protocol_or_later(protocols, PRT_LINKAUTH, 3); + protocol_list_supports_protocol(protocols, PRT_RELAY, + PROTOVER_RELAY_CANONICAL_IPV6); out->supports_ed25519_hs_intro = - protocol_list_supports_protocol(protocols, PRT_HSINTRO, 4); + protocol_list_supports_protocol(protocols, PRT_HSINTRO, + PROTOVER_HS_INTRO_V3); out->supports_establish_intro_dos_extension = - protocol_list_supports_protocol(protocols, PRT_HSINTRO, 5); - - out->supports_v3_hsdir = - protocol_list_supports_protocol(protocols, PRT_HSDIR, - PROTOVER_HSDIR_V3); + protocol_list_supports_protocol(protocols, PRT_HSINTRO, + PROTOVER_HS_INTRO_DOS); out->supports_v3_rendezvous_point = protocol_list_supports_protocol(protocols, PRT_HSREND, PROTOVER_HS_RENDEZVOUS_POINT_V3); + out->supports_v3_hsdir = + protocol_list_supports_protocol(protocols, PRT_HSDIR, + PROTOVER_HSDIR_V3); + out->supports_hs_setup_padding = protocol_list_supports_protocol(protocols, PRT_PADDING, PROTOVER_HS_SETUP_PADDING); |