Report UNIX connection addresses that we opened correctly.

This is an aside on ticket27670.
This commit is contained in:
Nick Mathewson 2018-09-12 17:42:24 -04:00
parent f308e81fa7
commit fed2c26e60

View File

@ -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: