diff options
author | Roger Dingledine <arma@torproject.org> | 2005-03-26 06:27:04 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2005-03-26 06:27:04 +0000 |
commit | fcfe6d2e8bc7de246bbd801e3258b9ca7fda4002 (patch) | |
tree | 0fac0c1ecd3b0d46599cb5ddefb818a279c75f33 /src/or/relay.c | |
parent | 9e1543401f093b112a4c6d7706ec9a7c9ec34b51 (diff) | |
download | tor-fcfe6d2e8bc7de246bbd801e3258b9ca7fda4002.tar.gz tor-fcfe6d2e8bc7de246bbd801e3258b9ca7fda4002.zip |
fix assert: stop trying to send a socks reply to an *exit*
connection when we get an end cell before it's finished opening.
svn:r3886
Diffstat (limited to 'src/or/relay.c')
-rw-r--r-- | src/or/relay.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/relay.c b/src/or/relay.c index f03332fbf0..9425922823 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -659,9 +659,10 @@ connection_edge_process_relay_cell_not_open( 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))); + if (conn->type == CONN_TYPE_AP) + 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; } |