[tor-commits] [tor/master] Report UNIX connection addresses that we opened correctly.

nickm at torproject.org nickm at torproject.org
Thu Sep 13 12:23:33 UTC 2018


commit fed2c26e6028ee2ab77ad47ce91b6676fc2b31a2
Author: Nick Mathewson <nickm at torproject.org>
Date:   Wed Sep 12 17:42:24 2018 -0400

    Report UNIX connection addresses that we opened correctly.
    
    This is an aside on ticket27670.
---
 src/core/mainloop/connection.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/core/mainloop/connection.c b/src/core/mainloop/connection.c
index ffc9010fb..3c057ad14 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:





More information about the tor-commits mailing list