mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-09-20 13:06:20 +02:00
relay: Send DESTROY cell instead of TRUNCATED cell
Note that with this commit, TRUNCATED cells won't be used anymore that is client and relays won't emit them. Fixes #40623 Signed-off-by: David Goulet <dgoulet@torproject.org>
This commit is contained in:
parent
c213c1b0d1
commit
8d8afc4efa
4
changes/ticket40623
Normal file
4
changes/ticket40623
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
o Major bugfixes (relay):
|
||||||
|
- Stop sending TRUNCATED cell and instead close the circuits which sends a
|
||||||
|
DESTROY cell so every relay in the circuit path can stop queuing cells.
|
||||||
|
Fixes bug 40623; bugfix on 0.1.0.2-rc.
|
@ -637,11 +637,11 @@ command_process_destroy_cell(cell_t *cell, channel_t *chan)
|
|||||||
if (CIRCUIT_IS_ORIGIN(circ)) {
|
if (CIRCUIT_IS_ORIGIN(circ)) {
|
||||||
circuit_mark_for_close(circ, reason|END_CIRC_REASON_FLAG_REMOTE);
|
circuit_mark_for_close(circ, reason|END_CIRC_REASON_FLAG_REMOTE);
|
||||||
} else {
|
} else {
|
||||||
char payload[1];
|
/* Close the circuit so we stop queuing cells for it and propagate the
|
||||||
log_debug(LD_OR, "Delivering 'truncated' back.");
|
* DESTROY cell down the circuit so relays can stop queuing in-flight
|
||||||
payload[0] = (char)reason;
|
* cells for this circuit which helps with memory pressure. */
|
||||||
relay_send_command_from_edge(0, circ, RELAY_COMMAND_TRUNCATED,
|
log_debug(LD_OR, "Received DESTROY cell from n_chan, closing circuit.");
|
||||||
payload, sizeof(payload), NULL);
|
circuit_mark_for_close(circ, END_CIRC_REASON_TORPROTOCOL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user