[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor] 01/06: relay: Use remote reason when sending back a DESTROY



This is an automated email from the git hooks/post-receive script.

dgoulet pushed a commit to branch main
in repository tor.

commit dc13936f20e6263a099f40d32a274847e8384f96
Author: David Goulet <dgoulet@xxxxxxxxxxxxxx>
AuthorDate: Wed Jul 27 08:32:01 2022 -0400

    relay: Use remote reason when sending back a DESTROY
    
    Fix from previous commit where a DESTROY cell is sent instead of a
    TRUNCATED.
    
    Related to #40623
    
    Signed-off-by: David Goulet <dgoulet@xxxxxxxxxxxxxx>
---
 src/core/or/command.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/or/command.c b/src/core/or/command.c
index 6ddfc317d6..65853f7844 100644
--- a/src/core/or/command.c
+++ b/src/core/or/command.c
@@ -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);
     }
   }
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits