diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-10-28 17:04:15 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-10-28 17:04:15 -0400 |
commit | cf8bffa35901a26ae840dcd715dd2f664259efb3 (patch) | |
tree | c39754282de34e3641de07ab2cb0f0241614f2b7 /src | |
parent | f6b1dc2805ce23d4f7fddcf2714b13f718d20038 (diff) | |
download | tor-cf8bffa35901a26ae840dcd715dd2f664259efb3.tar tor-cf8bffa35901a26ae840dcd715dd2f664259efb3.tar.gz |
Discard all cells on a marked connection
Fix for bug 4299
Diffstat (limited to 'src')
-rw-r--r-- | src/or/command.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/command.c b/src/or/command.c index 1fa8bc6a7..5271a7a90 100644 --- a/src/or/command.c +++ b/src/or/command.c @@ -132,6 +132,9 @@ command_process_cell(cell_t *cell, or_connection_t *conn) #define PROCESS_CELL(tp, cl, cn) command_process_ ## tp ## _cell(cl, cn) #endif + if (conn->_base.marked_for_close) + return; + /* Reject all but VERSIONS and NETINFO when handshaking. */ if (handshaking && cell->command != CELL_VERSIONS && cell->command != CELL_NETINFO) @@ -205,6 +208,9 @@ command_process_var_cell(var_cell_t *cell, or_connection_t *conn) } #endif + if (conn->_base.marked_for_close) + return; + /* reject all when not handshaking. */ if (conn->_base.state != OR_CONN_STATE_OR_HANDSHAKING) return; |