summaryrefslogtreecommitdiff
path: root/src/test/test_relaycell.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-07-30 14:27:29 -0400
committerNick Mathewson <nickm@torproject.org>2020-07-30 14:27:29 -0400
commitc2d5ec5e43c2690656ea5a5a384683108782d149 (patch)
tree0f9f9cd201c2d970170e98a5e94d713737a2e234 /src/test/test_relaycell.c
parentc4742b89b23d58958ee0d5ca324dac5948c94bf6 (diff)
parentcdb0e6c2522aac372c9a816300dacfd62856dd48 (diff)
downloadtor-c2d5ec5e43c2690656ea5a5a384683108782d149.tar.gz
tor-c2d5ec5e43c2690656ea5a5a384683108782d149.zip
Merge branch 'maint-0.4.2' into bug40076_042
Diffstat (limited to 'src/test/test_relaycell.c')
-rw-r--r--src/test/test_relaycell.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/test/test_relaycell.c b/src/test/test_relaycell.c
index 0623583511..c65279fb25 100644
--- a/src/test/test_relaycell.c
+++ b/src/test/test_relaycell.c
@@ -17,6 +17,7 @@
#include "core/or/circuitbuild.h"
#include "core/or/circuitlist.h"
#include "core/or/connection_edge.h"
+#include "core/or/sendme.h"
#include "core/or/relay.h"
#include "test/test.h"
#include "test/log_test_helpers.h"
@@ -812,7 +813,11 @@ test_circbw_relay(void *arg)
ASSERT_UNCOUNTED_BW();
/* Sendme on circuit with non-full window: counted */
- PACK_CELL(0, RELAY_COMMAND_SENDME, "Data1234");
+ PACK_CELL(0, RELAY_COMMAND_SENDME, "");
+ /* Recording a cell, the window is updated after decryption so off by one in
+ * order to record and then we process it with the proper window. */
+ circ->cpath->package_window = 901;
+ sendme_record_cell_digest_on_circ(TO_CIRCUIT(circ), circ->cpath);
circ->cpath->package_window = 900;
connection_edge_process_relay_cell(&cell, TO_CIRCUIT(circ), edgeconn,
circ->cpath);