aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorMike Perry <mikeperry-git@torproject.org>2022-02-17 00:04:41 +0000
committerMike Perry <mikeperry-git@torproject.org>2022-02-22 19:28:36 +0000
commit5c88bea84c3535ed908d51d2ed2e9beaa58ee607 (patch)
treee25f279eac1d42a3026fe939a7ccbbaa95a746cb /src/core
parent933e4b4788982d35414d5ecfe54a94479513b136 (diff)
downloadtor-5c88bea84c3535ed908d51d2ed2e9beaa58ee607.tar.gz
tor-5c88bea84c3535ed908d51d2ed2e9beaa58ee607.zip
Add test for circuit_sendme_cell_is_next() when sendme_inc is 100.
This ensures compatibility with old tor.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/or/sendme.c2
-rw-r--r--src/core/or/sendme.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/core/or/sendme.c b/src/core/or/sendme.c
index 9acef1cc20..494910049e 100644
--- a/src/core/or/sendme.c
+++ b/src/core/or/sendme.c
@@ -338,7 +338,7 @@ record_cell_digest_on_circ(circuit_t *circ, const uint8_t *sendme_digest)
* low in the stack when decrypting or encrypting a cell. The window is only
* updated once the cell is actually put in the outbuf.
*/
-static bool
+STATIC bool
circuit_sendme_cell_is_next(int deliver_window, int sendme_inc)
{
/* Are we at the limit of the increment and if not, we don't expect next
diff --git a/src/core/or/sendme.h b/src/core/or/sendme.h
index 2abec91a91..bc1daef23d 100644
--- a/src/core/or/sendme.h
+++ b/src/core/or/sendme.h
@@ -73,6 +73,8 @@ STATIC ssize_t build_cell_payload_v1(const uint8_t *cell_digest,
STATIC bool sendme_is_valid(const circuit_t *circ,
const uint8_t *cell_payload,
size_t cell_payload_len);
+STATIC bool circuit_sendme_cell_is_next(int deliver_window,
+ int sendme_inc);
#endif /* defined(TOR_UNIT_TESTS) */