summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-09-12 17:42:24 -0400
committerNick Mathewson <nickm@torproject.org>2018-09-12 17:42:24 -0400
commitfed2c26e6028ee2ab77ad47ce91b6676fc2b31a2 (patch)
tree415d37dcd9e8dc19a69de833bb8d29199775c46d
parentf308e81fa755efd405919d66bd59c873de325276 (diff)
downloadtor-fed2c26e6028ee2ab77ad47ce91b6676fc2b31a2.tar.gz
tor-fed2c26e6028ee2ab77ad47ce91b6676fc2b31a2.zip
Report UNIX connection addresses that we opened correctly.
This is an aside on ticket27670.
-rw-r--r--src/core/mainloop/connection.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/mainloop/connection.c b/src/core/mainloop/connection.c
index ffc9010fb8..3c057ad146 100644
--- a/src/core/mainloop/connection.c
+++ b/src/core/mainloop/connection.c
@@ -1506,8 +1506,13 @@ connection_listener_new(const struct sockaddr *listensockaddr,
*/
connection_check_oos(get_n_open_sockets(), 0);
- log_notice(LD_NET, "Opened %s on %s",
- conn_type_to_string(type), fmt_addrport(&addr, usePort));
+ if (conn->socket_family == AF_UNIX) {
+ log_notice(LD_NET, "Opened %s on %s",
+ conn_type_to_string(type), conn->address);
+ } else {
+ log_notice(LD_NET, "Opened %s on %s",
+ conn_type_to_string(type), fmt_addrport(&addr, usePort));
+ }
return conn;
err: