aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2002-09-27 23:16:39 +0000
committerRoger Dingledine <arma@torproject.org>2002-09-27 23:16:39 +0000
commit23264ebcb5d943cff1df63ebd0a77e832bb5d6b8 (patch)
tree58077290dcf8e2e7cca44a4ccfb33ad099b826f5
parent2fa4b5bb53b3a4f51daaf2d59c612846d688dc18 (diff)
downloadtor-23264ebcb5d943cff1df63ebd0a77e832bb5d6b8.tar
tor-23264ebcb5d943cff1df63ebd0a77e832bb5d6b8.tar.gz
support socks4 too
svn:r118
-rw-r--r--src/or/connection_ap.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/connection_ap.c b/src/or/connection_ap.c
index 7f22addc6..eee068a28 100644
--- a/src/or/connection_ap.c
+++ b/src/or/connection_ap.c
@@ -72,12 +72,13 @@ int ap_handshake_process_socks(connection_t *conn) {
if(socks4_info.destip[0] ||
socks4_info.destip[1] ||
socks4_info.destip[2] ||
- !socks4_info.destip[3]) { /* must be in form 0.0.0.x, at least for now */
+ !socks4_info.destip[3]) { /* not 0.0.0.x */
log(LOG_NOTICE,"ap_handshake_process_socks(): destip not in form 0.0.0.x.");
- ap_handshake_socks_reply(conn, SOCKS4_REQUEST_REJECT);
- return -1;
+ sprintf(conn->dest_tmp, "%d.%d.%d.%d", socks4_info.destip[0],
+ socks4_info.destip[1], socks4_info.destip[2], socks4_info.destip[3]);
+ conn->dest_addr = strdup(conn->dest_tmp);
+ log(LOG_DEBUG,"ap_handshake_process_socks(): Successfully read destip (%s)", conn->dest_addr);
}
- log(LOG_DEBUG,"ap_handshake_process_socks(): Successfully read destip (0.0.0.x.)");
}