[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] fix another case where we need to send a socks reply (reject)
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] fix another case where we need to send a socks reply (reject)
- From: arma@xxxxxxxx (Roger Dingledine)
- Date: Fri, 25 Mar 2005 06:12:17 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Fri, 25 Mar 2005 06:12:37 -0500
- Reply-to: or-dev@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Update of /home2/or/cvsroot/tor/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/tor/src/or
Modified Files:
connection.c relay.c
Log Message:
fix another case where we need to send a socks reply (reject)
back before we close the conn.
Index: connection.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/connection.c,v
retrieving revision 1.346
retrieving revision 1.347
diff -u -d -r1.346 -r1.347
--- connection.c 25 Mar 2005 10:55:06 -0000 1.346
+++ connection.c 25 Mar 2005 11:12:14 -0000 1.347
@@ -281,7 +281,7 @@
if (conn->socks_request->has_finished == 0) {
/* since conn gets removed right after this function finishes,
* there's no point trying to send back a reply at this point. */
- log_fn(LOG_INFO,"Bug: Closing stream without sending back a socks reply.");
+ log_fn(LOG_WARN,"Bug: Closing stream without sending back a socks reply.");
} else {
control_event_stream_status(conn, STREAM_EVENT_CLOSED);
}
Index: relay.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/relay.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- relay.c 24 Mar 2005 21:57:45 -0000 1.54
+++ relay.c 25 Mar 2005 11:12:14 -0000 1.55
@@ -659,6 +659,9 @@
if (CIRCUIT_IS_ORIGIN(circ))
circuit_log_path(LOG_INFO,circ);
conn->has_sent_end = 1; /* we just got an 'end', don't need to send one */
+ connection_ap_handshake_socks_reply(conn, NULL, 0,
+ connection_edge_end_reason_socks5_response(*(char *)
+ (cell->payload+RELAY_HEADER_SIZE)));
connection_mark_for_close(conn);
return 0;
}