From: Nick Mathewson Date: Fri, 2 Dec 2016 17:00:46 +0000 (-0500) Subject: Merge branch 'bug20716_026' into maint-0.2.9 X-Git-Tag: tor-0.2.9.7-rc~24^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8b93cbc16d2ec0b64ce9d48482a2cf2164ed1199;p=thirdparty%2Ftor.git Merge branch 'bug20716_026' into maint-0.2.9 --- 8b93cbc16d2ec0b64ce9d48482a2cf2164ed1199 diff --cc src/or/connection.c index 49cb78e389,3fe7f453e8..d30ec46357 --- a/src/or/connection.c +++ b/src/or/connection.c @@@ -1594,8 -1497,13 +1594,13 @@@ connection_handle_listener_read(connect /* remember the remote address */ tor_addr_copy(&newconn->addr, &addr); - newconn->port = port; - newconn->address = tor_addr_to_str_dup(&addr); + if (new_type == CONN_TYPE_AP && conn->socket_family == AF_UNIX) { + newconn->port = 0; + newconn->address = tor_strdup(conn->address); + } else { + newconn->port = port; - newconn->address = tor_dup_addr(&addr); ++ newconn->address = tor_addr_to_str_dup(&addr); + } if (new_type == CONN_TYPE_AP && conn->socket_family != AF_UNIX) { log_info(LD_NET, "New SOCKS connection opened from %s.",