Skip to content
Snippets Groups Projects
Commit 153b9892 authored by George Kadianakis's avatar George Kadianakis
Browse files

Extract data from DESTROY cell _after_ protocol violation checks.

parent f00a8b43
No related branches found
No related tags found
No related merge requests found
......@@ -591,7 +591,6 @@ command_process_destroy_cell(cell_t *cell, or_connection_t *conn)
int reason;
circ = circuit_get_by_circid_orconn(cell->circ_id, conn);
reason = (uint8_t)cell->payload[0];
if (!circ) {
log_info(LD_OR,"unknown circuit %d on connection from %s:%d. Dropping.",
cell->circ_id, conn->_base.address, conn->_base.port);
......@@ -599,6 +598,8 @@ command_process_destroy_cell(cell_t *cell, or_connection_t *conn)
}
log_debug(LD_OR,"Received for circID %d.",cell->circ_id);
reason = (uint8_t)cell->payload[0];
if (!CIRCUIT_IS_ORIGIN(circ) &&
cell->circ_id == TO_OR_CIRCUIT(circ)->p_circ_id) {
/* the destroy came from behind */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment