[tor-commits] [torsocks/master] Fix: handle conn. type domain name for socks5 connect

dgoulet at torproject.org dgoulet at torproject.org
Fri Apr 4 22:40:27 UTC 2014


commit 713c70741ceadd201c6b8e558ab2ac71c1c1286e
Author: David Goulet <dgoulet at ev0ke.net>
Date:   Tue Feb 25 21:44:33 2014 -0500

    Fix: handle conn. type domain name for socks5 connect
    
    Signed-off-by: David Goulet <dgoulet at ev0ke.net>
---
 src/common/socks5.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/common/socks5.c b/src/common/socks5.c
index 9525d04..bea583b 100644
--- a/src/common/socks5.c
+++ b/src/common/socks5.c
@@ -135,6 +135,11 @@ int socks5_connect(struct connection *conn)
 	 * remote IPv6, we have to connect to the Tor daemon in v6.
 	 */
 	switch (conn->dest_addr.domain) {
+	case CONNECTION_DOMAIN_NAME:
+		/*
+		 * For a domain name such as an onion address, use the default IPv4 to
+		 * connect to the Tor SOCKS port.
+		 */
 	case CONNECTION_DOMAIN_INET:
 		socks5_addr = (struct sockaddr *) &tsocks_config.socks5_addr.u.sin;
 		len = sizeof(tsocks_config.socks5_addr.u.sin);





More information about the tor-commits mailing list