From c7c2287d0761c8fd1d7ce0f764b0ffb15e722944 Mon Sep 17 00:00:00 2001 From: Mike Perry Date: Thu, 3 Mar 2022 20:43:07 +0000 Subject: Make a check for origin circuit explicit. --- src/core/or/sendme.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/core/or/sendme.c b/src/core/or/sendme.c index 494910049e..90f4dfcf05 100644 --- a/src/core/or/sendme.c +++ b/src/core/or/sendme.c @@ -474,12 +474,14 @@ sendme_process_circuit_level(crypt_path_t *layer_hint, return -END_CIRC_REASON_TORPROTOCOL; } + /* origin circuits need to count valid sendmes as valid protocol data */ + if (CIRCUIT_IS_ORIGIN(circ)) { + circuit_read_valid_data(TO_ORIGIN_CIRCUIT(circ), cell_payload_len); + } + // Get CC if (layer_hint) { cc = layer_hint->ccontrol; - - /* origin circuits need to count valid sendmes as valid protocol data */ - circuit_read_valid_data(TO_ORIGIN_CIRCUIT(circ), cell_payload_len); } else { cc = circ->ccontrol; } -- cgit v1.2.3-54-g00ecf