commit 2fa559117c36e2e8e3996048a03c0bbc5c6984e8
Author: David Goulet <dgou...@torproject.org>
Date:   Fri Apr 20 11:24:05 2018 -0400

    connect: Always pass .onion IP cookie to connection object
    
    Fixes #23876
    
    Signed-off-by: David Goulet <dgou...@torproject.org>
---
 src/lib/connect.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/lib/connect.c b/src/lib/connect.c
index 7f5657c..854e994 100644
--- a/src/lib/connect.c
+++ b/src/lib/connect.c
@@ -156,10 +156,11 @@ LIBC_CONNECT_RET_TYPE tsocks_connect(LIBC_CONNECT_SIG)
        onion_pool_unlock(&tsocks_onion_pool);
        if (on_entry) {
                /*
-                * Create a connection without a destination address since we 
will set
+                * Create a connection with the onion IP cookie since 
getpeername()
+                * might need it, and set connection domain and hostname to use
                 * the onion address name found before.
                 */
-               new_conn = connection_create(sockfd, NULL);
+               new_conn = connection_create(sockfd, addr);
                if (!new_conn) {
                        errno = ENOMEM;
                        goto error;



_______________________________________________
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits

Reply via email to