diff options
author | David Goulet <dgoulet@torproject.org> | 2022-07-26 16:16:04 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2022-07-26 16:16:04 -0400 |
commit | 2dee45267bde9243afdbf1e7e44a496732b9b2fa (patch) | |
tree | 716def10ea400aca0ba463323dbf6ab2d492cafc | |
parent | 5568961cbf0749f5a9499abdda4ca98cffdc0992 (diff) | |
parent | 5260b4ef34da7a70eef09df121519ec31d37d9e0 (diff) | |
download | tor-2dee45267bde9243afdbf1e7e44a496732b9b2fa.tar.gz tor-2dee45267bde9243afdbf1e7e44a496732b9b2fa.zip |
Merge branch 'maint-0.4.6' into release-0.4.6
-rw-r--r-- | changes/ticket40623 | 4 | ||||
-rw-r--r-- | src/core/or/command.c | 10 |
2 files changed, 9 insertions, 5 deletions
diff --git a/changes/ticket40623 b/changes/ticket40623 new file mode 100644 index 0000000000..d2a0e7eaad --- /dev/null +++ b/changes/ticket40623 @@ -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. diff --git a/src/core/or/command.c b/src/core/or/command.c index 622217a78e..1343177db4 100644 --- a/src/core/or/command.c +++ b/src/core/or/command.c @@ -660,11 +660,11 @@ command_process_destroy_cell(cell_t *cell, channel_t *chan) if (CIRCUIT_IS_ORIGIN(circ)) { circuit_mark_for_close(circ, reason|END_CIRC_REASON_FLAG_REMOTE); } else { - char payload[1]; - log_debug(LD_OR, "Delivering 'truncated' back."); - payload[0] = (char)reason; - relay_send_command_from_edge(0, circ, RELAY_COMMAND_TRUNCATED, - payload, sizeof(payload), NULL); + /* Close the circuit so we stop queuing cells for it and propagate the + * DESTROY cell down the circuit so relays can stop queuing in-flight + * cells for this circuit which helps with memory pressure. */ + log_debug(LD_OR, "Received DESTROY cell from n_chan, closing circuit."); + circuit_mark_for_close(circ, END_CIRC_REASON_TORPROTOCOL); } } } |