diff options
author | teor <teor@riseup.net> | 2020-05-11 12:25:41 +1000 |
---|---|---|
committer | teor <teor@riseup.net> | 2020-05-11 14:39:42 +1000 |
commit | c7f085d9bdf4196b04054f5812e29137d1789ad7 (patch) | |
tree | 31b1b1a1b1bef9625a5757e431de9fbb2411a886 /src/core | |
parent | 51f32140b41551bf8f34c9e30a067ddf027401b6 (diff) | |
download | tor-c7f085d9bdf4196b04054f5812e29137d1789ad7.tar.gz tor-c7f085d9bdf4196b04054f5812e29137d1789ad7.zip |
protover: Add node functions for IPv6 extend support
Part of 33226.
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/or/or.h | 12 | ||||
-rw-r--r-- | src/core/or/versions.c | 7 |
2 files changed, 19 insertions, 0 deletions
diff --git a/src/core/or/or.h b/src/core/or/or.h index 28211b48c6..7e02da6648 100644 --- a/src/core/or/or.h +++ b/src/core/or/or.h @@ -815,6 +815,18 @@ typedef struct protover_summary_flags_t { * accept EXTEND2 cells. This requires Relay=2. */ unsigned int supports_extend2_cells:1; + /** True iff this router has a version or protocol list that allows it to + * accept IPv6 connections. This requires Relay=2 or Relay=3. */ + unsigned int supports_accepting_ipv6_extends:1; + + /** True iff this router has a version or protocol list that allows it to + * initiate IPv6 connections. This requires Relay=3. */ + unsigned int supports_initiating_ipv6_extends:1; + + /** True iff this router has a version or protocol list that allows it to + * consider IPv6 connections canonical. This requires Relay=3. */ + unsigned int supports_canonical_ipv6_conns:1; + /** True iff this router has a protocol list that allows it to negotiate * ed25519 identity keys on a link handshake with us. This * requires LinkAuth=3. */ diff --git a/src/core/or/versions.c b/src/core/or/versions.c index 2a33bf68fe..a8dfe7e61c 100644 --- a/src/core/or/versions.c +++ b/src/core/or/versions.c @@ -437,6 +437,13 @@ memoize_protover_summary(protover_summary_flags_t *out, out->supports_extend2_cells = protocol_list_supports_protocol(protocols, PRT_RELAY, 2); + out->supports_accepting_ipv6_extends = ( + protocol_list_supports_protocol(protocols, PRT_RELAY, 2) || + protocol_list_supports_protocol(protocols, PRT_RELAY, 3)); + out->supports_initiating_ipv6_extends = + protocol_list_supports_protocol(protocols, PRT_RELAY, 3); + 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); |