]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Merge branch 'bug20716_026' into maint-0.2.9
authorNick Mathewson <nickm@torproject.org>
Fri, 2 Dec 2016 17:00:46 +0000 (12:00 -0500)
committerNick Mathewson <nickm@torproject.org>
Fri, 2 Dec 2016 17:00:46 +0000 (12:00 -0500)
1  2 
src/or/connection.c

index 49cb78e3898003a92378417ee6d1ece0bea7ccb1,3fe7f453e8b8360905ff0a34dc55c1b408857fe5..d30ec463577e230adde0c4f0f4bad8f18846af8c
@@@ -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.",