diff options
author | teor <teor@torproject.org> | 2020-04-29 20:10:14 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2020-04-29 22:43:09 +1000 |
commit | cab05a84cd1504bc4929207a1f33b266744e5dca (patch) | |
tree | 7f9e34c9c06ab729302ee1716a87a971b6c68aff /src/feature/relay | |
parent | c3e058dfac1cbc7cb0dee5cdb1bdc61c1dc0f4fa (diff) | |
download | tor-cab05a84cd1504bc4929207a1f33b266744e5dca.tar.gz tor-cab05a84cd1504bc4929207a1f33b266744e5dca.zip |
relay: Add IP version tests for circuit extends
Add IPv4-only and IPv6-only tests for
circuit_open_connection_for_extend().
Part of 33817.
Diffstat (limited to 'src/feature/relay')
-rw-r--r-- | src/feature/relay/router.c | 4 | ||||
-rw-r--r-- | src/feature/relay/router.h | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c index 89e232ccc0..b0a56012db 100644 --- a/src/feature/relay/router.c +++ b/src/feature/relay/router.c @@ -1491,8 +1491,8 @@ router_get_advertised_ipv6_or_ap(const or_options_t *options, } /** Returns true if this router has an advertised IPv6 ORPort. */ -bool -router_has_advertised_ipv6_orport(const or_options_t *options) +MOCK_IMPL(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); diff --git a/src/feature/relay/router.h b/src/feature/relay/router.h index c3a93cc0aa..1a262a6799 100644 --- a/src/feature/relay/router.h +++ b/src/feature/relay/router.h @@ -68,7 +68,8 @@ uint16_t router_get_active_listener_port_by_type_af(int listener_type, uint16_t router_get_advertised_or_port(const or_options_t *options); void router_get_advertised_ipv6_or_ap(const or_options_t *options, tor_addr_port_t *ipv6_ap_out); -bool router_has_advertised_ipv6_orport(const or_options_t *options); +MOCK_DECL(bool, router_has_advertised_ipv6_orport,( + const or_options_t *options)); uint16_t router_get_advertised_or_port_by_af(const or_options_t *options, sa_family_t family); uint16_t router_get_advertised_dir_port(const or_options_t *options, |