diff options
author | David Goulet <dgoulet@torproject.org> | 2020-07-22 11:09:21 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2020-07-22 11:09:21 -0400 |
commit | 6de860497e8519d7d327f270ec9ec343b83bf75b (patch) | |
tree | 422ccf5616c0d6963641d0ec398fc76a9f9b2de5 /src/feature/dirclient | |
parent | a4c5b7d7421b9f02d479e4471b527ee3b9285d8c (diff) | |
download | tor-6de860497e8519d7d327f270ec9ec343b83bf75b.tar.gz tor-6de860497e8519d7d327f270ec9ec343b83bf75b.zip |
log: Don't use twice fmt_addr() in same logging statement
Fixes #40059
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/dirclient')
-rw-r--r-- | src/feature/dirclient/dirclient.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/feature/dirclient/dirclient.c b/src/feature/dirclient/dirclient.c index 7a026d3c52..337fa4c965 100644 --- a/src/feature/dirclient/dirclient.c +++ b/src/feature/dirclient/dirclient.c @@ -686,12 +686,14 @@ directory_choose_address_routerstatus(const routerstatus_t *status, * connect to it. */ if (!have_or && !have_dir) { static int logged_backtrace = 0; + char *ipv6_str = tor_addr_to_str_dup(&status->ipv6_addr); log_info(LD_BUG, "Rejected all OR and Dir addresses from %s when " "launching an outgoing directory connection to: IPv4 %s OR %d " "Dir %d IPv6 %s OR %d Dir %d", routerstatus_describe(status), fmt_addr(&status->ipv4_addr), status->ipv4_orport, - status->ipv4_dirport, fmt_addr(&status->ipv6_addr), - status->ipv6_orport, status->ipv4_dirport); + status->ipv4_dirport, ipv6_str, status->ipv6_orport, + status->ipv4_dirport); + tor_free(ipv6_str); if (!logged_backtrace) { log_backtrace(LOG_INFO, LD_BUG, "Addresses came from"); logged_backtrace = 1; |