mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
streams are now 8 bytes, and are recognized by intermediate hops
the OP only crypts the appropriate number of times depending on which layer (hop on the path) it's for/from. svn:r262
This commit is contained in:
@@ -241,14 +241,14 @@ void command_process_relay_cell(cell_t *cell, connection_t *conn) {
|
||||
|
||||
if(cell->aci == circ->p_aci) { /* it's an outgoing cell */
|
||||
cell->aci = circ->n_aci; /* switch it */
|
||||
if(circuit_deliver_relay_cell(cell, circ, CELL_DIRECTION_OUT) < 0) {
|
||||
if(circuit_deliver_relay_cell(cell, circ, CELL_DIRECTION_OUT, conn->cpath_layer) < 0) {
|
||||
log(LOG_INFO,"command_process_relay_cell(): circuit_deliver_relay_cell (forward) failed. Closing.");
|
||||
circuit_close(circ);
|
||||
return;
|
||||
}
|
||||
} else { /* it's an ingoing cell */
|
||||
cell->aci = circ->p_aci; /* switch it */
|
||||
if(circuit_deliver_relay_cell(cell, circ, CELL_DIRECTION_IN) < 0) {
|
||||
if(circuit_deliver_relay_cell(cell, circ, CELL_DIRECTION_IN, NULL) < 0) {
|
||||
log(LOG_DEBUG,"command_process_relay_cell(): circuit_deliver_relay_cell (backward) failed. Closing.");
|
||||
circuit_close(circ);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user