Skip to content

Commit

Permalink
Merge branch 'maint-0.4.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
dgoulet-tor committed Jul 26, 2022
2 parents ed74c52 + e98995b commit 028f5fd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions changes/ticket40623
Original file line number Diff line number Diff line change
@@ -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.
10 changes: 5 additions & 5 deletions src/core/or/command.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit 028f5fd

Please sign in to comment.