aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2022-07-26 16:16:04 -0400
committerDavid Goulet <dgoulet@torproject.org>2022-07-26 16:16:04 -0400
commite98995bb0899c3af7d8fcd2da9a753a58ad5ec66 (patch)
tree02cd81407b47565050124c52ee7392a2de0a7274 /src
parente234df609873a5b88fb564a014ec6ff14c1e278e (diff)
parent5260b4ef34da7a70eef09df121519ec31d37d9e0 (diff)
downloadtor-e98995bb0899c3af7d8fcd2da9a753a58ad5ec66.tar.gz
tor-e98995bb0899c3af7d8fcd2da9a753a58ad5ec66.zip
Merge branch 'maint-0.4.6' into maint-0.4.7
Diffstat (limited to 'src')
-rw-r--r--src/core/or/command.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/or/command.c b/src/core/or/command.c
index ffdd1f19d9..0d157e4393 100644
--- a/src/core/or/command.c
+++ b/src/core/or/command.c
@@ -664,11 +664,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);
}
}
}