diff options
author | David Goulet <dgoulet@torproject.org> | 2022-11-30 13:48:53 -0500 |
---|---|---|
committer | Mike Perry <mikeperry-git@torproject.org> | 2023-04-06 15:57:10 +0000 |
commit | a9fc6c937c42d879850ea46366a9fad8ff6d404b (patch) | |
tree | fe79c94c41dd005cfdd119f3c7ee439673f74058 /src/feature/nodelist | |
parent | 447775a5e0b2178b44826cf6802a9c5e779a45d1 (diff) | |
download | tor-a9fc6c937c42d879850ea46366a9fad8ff6d404b.tar.gz tor-a9fc6c937c42d879850ea46366a9fad8ff6d404b.zip |
protover: Support Relay=5 for Conflux (prop329)
Closes #40721
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/nodelist')
-rw-r--r-- | src/feature/nodelist/nodelist.c | 11 | ||||
-rw-r--r-- | src/feature/nodelist/nodelist.h | 1 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/feature/nodelist/nodelist.c b/src/feature/nodelist/nodelist.c index b895a2c7f8..bbaa51a407 100644 --- a/src/feature/nodelist/nodelist.c +++ b/src/feature/nodelist/nodelist.c @@ -1205,7 +1205,7 @@ node_ed25519_id_matches(const node_t *node, const ed25519_public_key_t *id) /** Dummy object that should be unreturnable. Used to ensure that * node_get_protover_summary_flags() always returns non-NULL. */ static const protover_summary_flags_t zero_protover_flags = { - 0,0,0,0,0,0,0,0,0,0,0,0,0 + 0,0,0,0,0,0,0,0,0,0,0,0,0,0 }; /** Return the protover_summary_flags for a given node. */ @@ -1341,6 +1341,15 @@ node_supports_accepting_ipv6_extends(const node_t *node, } } +/** Return true iff the given node supports conflux (Relay=5) */ +bool +node_supports_conflux(const node_t *node) +{ + tor_assert(node); + + return node_get_protover_summary_flags(node)->supports_conflux; +} + /** Return the RSA ID key's SHA1 digest for the provided node. */ const uint8_t * node_get_rsa_id_digest(const node_t *node) diff --git a/src/feature/nodelist/nodelist.h b/src/feature/nodelist/nodelist.h index 5a45490dbb..3d5ad9c0ea 100644 --- a/src/feature/nodelist/nodelist.h +++ b/src/feature/nodelist/nodelist.h @@ -84,6 +84,7 @@ bool node_supports_establish_intro_dos_extension(const node_t *node); bool node_supports_initiating_ipv6_extends(const node_t *node); bool node_supports_accepting_ipv6_extends(const node_t *node, bool need_canonical_ipv6_conn); +bool node_supports_conflux(const node_t *node); const uint8_t *node_get_rsa_id_digest(const node_t *node); MOCK_DECL(smartlist_t *,node_get_link_specifier_smartlist,(const node_t *node, |