aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_hs_client.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-06-30 16:06:05 -0400
committerDavid Goulet <dgoulet@torproject.org>2020-07-02 14:17:51 -0400
commite93ad428e2507f676ce97450b919c2d849633669 (patch)
treeda887bc09c2386cf6bdab97464b8c78793db420e /src/test/test_hs_client.c
parentcca3164f8d22492c40276ebda670836f93dab536 (diff)
downloadtor-e93ad428e2507f676ce97450b919c2d849633669.tar.gz
tor-e93ad428e2507f676ce97450b919c2d849633669.zip
Allow multiple addresses in extend_info_t.
In practice, there will be at most one ipv4 address and ipv6 address for now, but this code is designed to not care which address is which until forced to do so. This patch does not yet actually create extend_info_t objects with multiple addresses. Closes #34069.
Diffstat (limited to 'src/test/test_hs_client.c')
-rw-r--r--src/test/test_hs_client.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/test_hs_client.c b/src/test/test_hs_client.c
index 3fef1b41c6..f965344ce0 100644
--- a/src/test/test_hs_client.c
+++ b/src/test/test_hs_client.c
@@ -530,7 +530,7 @@ test_client_pick_intro(void *arg)
get_options_mutable()->ClientUseIPv6 = 1;
intro_ei = hs_get_extend_info_from_lspecs(ip->link_specifiers,
&ip->onion_key, 1);
- tt_assert(tor_addr_family(&intro_ei->addr) == AF_INET6);
+ tt_assert(tor_addr_family(&intro_ei->orports[0].addr) == AF_INET6);
}
tt_assert(intro_ei);
if (intro_ei) {
@@ -538,7 +538,8 @@ test_client_pick_intro(void *arg)
char ip_addr[TOR_ADDR_BUF_LEN];
/* We need to decorate in case it is an IPv6 else routerset_parse()
* doesn't like it. */
- ptr = tor_addr_to_str(ip_addr, &intro_ei->addr, sizeof(ip_addr), 1);
+ ptr = tor_addr_to_str(ip_addr, &intro_ei->orports[0].addr,
+ sizeof(ip_addr), 1);
tt_assert(ptr == ip_addr);
ret = routerset_parse(get_options_mutable()->ExcludeNodes,
ip_addr, "");