]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
relay: Use remote reason when sending back a DESTROY
authorDavid Goulet <dgoulet@torproject.org>
Wed, 27 Jul 2022 12:32:01 +0000 (08:32 -0400)
committerDavid Goulet <dgoulet@torproject.org>
Wed, 27 Jul 2022 12:32:01 +0000 (08:32 -0400)
Fix from previous commit where a DESTROY cell is sent instead of a
TRUNCATED.

Related to #40623

Signed-off-by: David Goulet <dgoulet@torproject.org>
src/core/or/command.c

index 6ddfc317d602aa1bcd84e11c3e55a0e411330c37..65853f78444748bd06e619de79344fa616fae349 100644 (file)
@@ -641,7 +641,7 @@ command_process_destroy_cell(cell_t *cell, channel_t *chan)
        * 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);
+      circuit_mark_for_close(circ, reason | END_CIRC_REASON_FLAG_REMOTE);
     }
   }
 }