diff options
Diffstat (limited to 'src/feature/relay/router.c')
-rw-r--r-- | src/feature/relay/router.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c index b0a56012db..2858371af5 100644 --- a/src/feature/relay/router.c +++ b/src/feature/relay/router.c @@ -1491,14 +1491,23 @@ router_get_advertised_ipv6_or_ap(const or_options_t *options, } /** Returns true if this router has an advertised IPv6 ORPort. */ -MOCK_IMPL(bool, -router_has_advertised_ipv6_orport,(const or_options_t *options)) +bool +router_has_advertised_ipv6_orport(const or_options_t *options) { tor_addr_port_t ipv6_ap; router_get_advertised_ipv6_or_ap(options, &ipv6_ap); return tor_addr_port_is_valid_ap(&ipv6_ap, 0); } +/** Returns true if this router has an advertised IPv6 ORPort. */ +MOCK_IMPL(bool, +router_can_extend_over_ipv6,(const or_options_t *options)) +{ + /* We might add some extra checks here, such as ExtendAllowIPv6Addresses + * from ticket 33818. */ + return router_has_advertised_ipv6_orport(options); +} + /** Return the port that we should advertise as our DirPort; * this is one of three possibilities: * The one that is passed as <b>dirport</b> if the DirPort option is 0, or |