diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-06-09 15:44:58 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-06-09 15:44:58 -0400 |
commit | 354f085e5f14c2bb4918b015e36cdc72748e0ea6 (patch) | |
tree | 0467dc89507ca7e7cc6a5f109332d693ed6a139a /src/feature/relay/router.c | |
parent | eaae5625cb1c5fdd26c766157742725aa4b7ad9e (diff) | |
parent | 1df451aba116f77a5a24e4e54cf343ec46d55f9a (diff) | |
download | tor-354f085e5f14c2bb4918b015e36cdc72748e0ea6.tar.gz tor-354f085e5f14c2bb4918b015e36cdc72748e0ea6.zip |
Merge remote-tracking branch 'tor-github/pr/1888/head'
Diffstat (limited to 'src/feature/relay/router.c')
-rw-r--r-- | src/feature/relay/router.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c index 34d8163c36..6914946729 100644 --- a/src/feature/relay/router.c +++ b/src/feature/relay/router.c @@ -1363,14 +1363,14 @@ decide_if_publishable_server(void) return 1; if (!router_get_advertised_or_port(options)) return 0; - if (!check_whether_orport_reachable(options)) + if (!router_should_skip_orport_reachability_check(options)) return 0; if (router_have_consensus_path() == CONSENSUS_PATH_INTERNAL) { /* All set: there are no exits in the consensus (maybe this is a tiny * test network), so we can't check our DirPort reachability. */ return 1; } else { - return check_whether_dirport_reachable(options); + return router_should_skip_dirport_reachability_check(options); } } @@ -1501,7 +1501,22 @@ router_has_advertised_ipv6_orport(const or_options_t *options) return tor_addr_port_is_valid_ap(&ipv6_ap, 0); } -/** Returns true if this router has an advertised IPv6 ORPort. */ +/** Returns true if this router can extend over IPv6. + * + * This check should only be performed by relay extend code. + * + * Clients should check if relays can initiate and accept IPv6 extends using + * node_supports_initiating_ipv6_extends() and + * node_supports_accepting_ipv6_extends(). + * + * As with other extends, relays should assume the client has already + * performed the relevant checks for the next hop. (Otherwise, relays that + * have just added IPv6 ORPorts won't be able to self-test those ORPorts.) + * + * Accepting relays don't need to perform any IPv6-specific checks before + * accepting a connection, because having an IPv6 ORPort implies support for + * the relevant protocol version. + */ MOCK_IMPL(bool, router_can_extend_over_ipv6,(const or_options_t *options)) { |