[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[or-cvs] support socks4 too
Update of /home/or/cvsroot/src/or
In directory moria.seul.org:/home/arma/work/onion/cvs/src/or
Modified Files:
connection_ap.c
Log Message:
support socks4 too
Index: connection_ap.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection_ap.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- connection_ap.c 26 Sep 2002 05:50:51 -0000 1.16
+++ connection_ap.c 27 Sep 2002 23:16:39 -0000 1.17
@@ -72,12 +72,13 @@
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.)");
}