aboutsummaryrefslogtreecommitdiff
path: root/src/feature/relay/selftest.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/feature/relay/selftest.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/feature/relay/selftest.c')
-rw-r--r--src/feature/relay/selftest.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/feature/relay/selftest.c b/src/feature/relay/selftest.c
index c663eb26b2..77c04abdd7 100644
--- a/src/feature/relay/selftest.c
+++ b/src/feature/relay/selftest.c
@@ -256,14 +256,15 @@ router_do_orport_reachability_checks(const routerinfo_t *me,
* be NULL. */
if (ei) {
const char *family_name = fmt_af_family(family);
+ const tor_addr_port_t *ap = extend_info_get_orport(ei, family);
log_info(LD_CIRC, "Testing %s of my %s ORPort: %s.",
!orport_reachable ? "reachability" : "bandwidth",
- family_name, fmt_addrport(&ei->addr, ei->port));
+ family_name, fmt_addrport_ap(ap));
if (!orport_reachable) {
/* This is only a 'reachability test' if we don't already think that
* the port is reachable. If we _do_ think it's reachable, then
* it counts as a 'bandwidth test'. */
- inform_testing_reachability(&ei->addr, ei->port, false);
+ inform_testing_reachability(&ap->addr, ap->port, false);
}
circuit_launch_by_extend_info(CIRCUIT_PURPOSE_TESTING, ei,
CIRCLAUNCH_NEED_CAPACITY|