diff options
author | teor <teor@torproject.org> | 2020-04-15 13:07:10 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2020-04-29 22:43:09 +1000 |
commit | ec5f4f3c5a5aa4d69b2867ba41bc83ba1e6c888a (patch) | |
tree | e0780aa099a9d8ed1d614d0301b7e11f95417b62 | |
parent | f8f688b3097d4aeaabc3f91d644c28540c8c9548 (diff) | |
download | tor-ec5f4f3c5a5aa4d69b2867ba41bc83ba1e6c888a.tar.gz tor-ec5f4f3c5a5aa4d69b2867ba41bc83ba1e6c888a.zip |
relay/circuitbuild: Report IPv6 addresses in a debug log
Part of 33817.
-rw-r--r-- | src/feature/relay/circuitbuild_relay.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/feature/relay/circuitbuild_relay.c b/src/feature/relay/circuitbuild_relay.c index 080781f719..7d3d589777 100644 --- a/src/feature/relay/circuitbuild_relay.c +++ b/src/feature/relay/circuitbuild_relay.c @@ -337,9 +337,13 @@ circuit_extend(struct cell_t *cell, struct circuit_t *circ) &should_launch); if (!n_chan) { - log_debug(LD_CIRC|LD_OR,"Next router (%s): %s.", - fmt_addrport(&ec.orport_ipv4.addr,ec.orport_ipv4.port), - msg?msg:"????"); + /* We can't use fmt_addr*() twice in the same function call, + * because it uses a static buffer. */ + log_debug(LD_CIRC|LD_OR, "Next router IPv4 (%s): %s.", + fmt_addrport_ap(&ec.orport_ipv4), + msg ? msg : "????"); + log_debug(LD_CIRC|LD_OR, "Next router IPv6 (%s).", + fmt_addrport_ap(&ec.orport_ipv6)); circuit_open_connection_for_extend(&ec, circ, should_launch); |