]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
fix another case where we need to send a socks reply (reject)
authorRoger Dingledine <arma@torproject.org>
Fri, 25 Mar 2005 11:12:14 +0000 (11:12 +0000)
committerRoger Dingledine <arma@torproject.org>
Fri, 25 Mar 2005 11:12:14 +0000 (11:12 +0000)
back before we close the conn.

svn:r3876

src/or/connection.c
src/or/relay.c

index fc4c6f0772ce2f4ce2bdf4e54af45c506c7273e4..bd49ac057a42ca050356be5ddeb3cdee0d05f253 100644 (file)
@@ -281,7 +281,7 @@ void connection_about_to_close_connection(connection_t *conn)
       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 7135569bbf51bf9245057faadb952d93ef9ea6a6..f03332fbf07247211f4724fa198e5e9cd487cc9d 100644 (file)
@@ -659,6 +659,9 @@ 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)));
     connection_mark_for_close(conn);
     return 0;
   }