aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/versions.c
diff options
context:
space:
mode:
authorteor <teor@riseup.net>2020-05-11 12:21:18 +1000
committerteor <teor@riseup.net>2020-05-11 12:24:06 +1000
commit51f32140b41551bf8f34c9e30a067ddf027401b6 (patch)
tree4e021961b7beb58fbc101113dbbd86101f23a819 /src/core/or/versions.c
parente787e521af990a76c6e42cd1a8d3f46f41561f24 (diff)
downloadtor-51f32140b41551bf8f34c9e30a067ddf027401b6.tar.gz
tor-51f32140b41551bf8f34c9e30a067ddf027401b6.zip
protover: Sort version flags by their underlying protocols
Also fix some comment typos, mainly ">=" when the code says "=". Part of 33226.
Diffstat (limited to 'src/core/or/versions.c')
-rw-r--r--src/core/or/versions.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/core/or/versions.c b/src/core/or/versions.c
index a9a960d66e..2a33bf68fe 100644
--- a/src/core/or/versions.c
+++ b/src/core/or/versions.c
@@ -434,25 +434,31 @@ memoize_protover_summary(protover_summary_flags_t *out,
memset(out, 0, sizeof(*out));
out->protocols_known = 1;
+
out->supports_extend2_cells =
protocol_list_supports_protocol(protocols, PRT_RELAY, 2);
+
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);
+
out->supports_ed25519_hs_intro =
protocol_list_supports_protocol(protocols, PRT_HSINTRO, 4);
+ 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);
+
out->supports_v3_rendezvous_point =
protocol_list_supports_protocol(protocols, PRT_HSREND,
PROTOVER_HS_RENDEZVOUS_POINT_V3);
+
out->supports_hs_setup_padding =
protocol_list_supports_protocol(protocols, PRT_PADDING,
PROTOVER_HS_SETUP_PADDING);
- out->supports_establish_intro_dos_extension =
- protocol_list_supports_protocol(protocols, PRT_HSINTRO, 5);
protover_summary_flags_t *new_cached = tor_memdup(out, sizeof(*out));
cached = strmap_set(protover_summary_map, protocols, new_cached);