mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 23:53:32 +01:00
Ignore control port commands after a QUIT
When a QUIT has been issued on a control port connection, then ignore further commands on that port. This fixes bug 1016.
This commit is contained in:
parent
fa89c9f086
commit
d308738919
@ -2888,7 +2888,12 @@ connection_control_process_inbuf(control_connection_t *conn)
|
|||||||
--data_len;
|
--data_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Quit is always valid. */
|
/* If the connection is already closing, ignore further commands */
|
||||||
|
if (TO_CONN(conn)->marked_for_close) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Otherwise, Quit is always valid. */
|
||||||
if (!strcasecmp(conn->incoming_cmd, "QUIT")) {
|
if (!strcasecmp(conn->incoming_cmd, "QUIT")) {
|
||||||
connection_write_str_to_buf("250 closing connection\r\n", conn);
|
connection_write_str_to_buf("250 closing connection\r\n", conn);
|
||||||
connection_mark_for_close(TO_CONN(conn));
|
connection_mark_for_close(TO_CONN(conn));
|
||||||
|
Loading…
Reference in New Issue
Block a user