diff options
author | Mike Perry <mikeperry-git@torproject.org> | 2022-03-03 20:43:07 +0000 |
---|---|---|
committer | Mike Perry <mikeperry-git@torproject.org> | 2022-03-03 20:55:46 +0000 |
commit | c7c2287d0761c8fd1d7ce0f764b0ffb15e722944 (patch) | |
tree | f495167e3904aef8bbaab75d2477bcbbe26ca568 /src | |
parent | 7cb050bd7dcc98854d25641c12d20cae549d61e9 (diff) | |
download | tor-c7c2287d0761c8fd1d7ce0f764b0ffb15e722944.tar.gz tor-c7c2287d0761c8fd1d7ce0f764b0ffb15e722944.zip |
Make a check for origin circuit explicit.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/or/sendme.c | 8 |
1 files changed, 5 insertions, 3 deletions
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; } |