diff options
author | Mike Perry <mikeperry-git@torproject.org> | 2018-06-01 00:23:08 +0000 |
---|---|---|
committer | Mike Perry <mikeperry-git@torproject.org> | 2018-06-01 00:23:08 +0000 |
commit | 93ee227e180686ab582c0d8199fe07f20046e8d7 (patch) | |
tree | 3b82a3107ea08cb689859849b15bb93185d27466 /src/test | |
parent | d7bbfd0f6217181fc7f4a4a71d23874873a5262a (diff) | |
download | tor-93ee227e180686ab582c0d8199fe07f20046e8d7.tar.gz tor-93ee227e180686ab582c0d8199fe07f20046e8d7.zip |
Bug 26259: Don't count 0-length RELAY_COMMAND_DATA in CIRC_BW OVERHEAD
This cell should be treated as invalid for purposes of CIRC_BW.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test_relaycell.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/test_relaycell.c b/src/test/test_relaycell.c index 1db5202739..52f4d6113e 100644 --- a/src/test/test_relaycell.c +++ b/src/test/test_relaycell.c @@ -233,6 +233,13 @@ test_circbw_relay(void *arg) circ->cpath); ASSERT_COUNTED_BW(); + /* Empty Data cell on open connection: not counted */ + ENTRY_TO_CONN(entryconn)->marked_for_close = 0; + PACK_CELL(1, RELAY_COMMAND_DATA, ""); + connection_edge_process_relay_cell(&cell, TO_CIRCUIT(circ), edgeconn, + circ->cpath); + ASSERT_UNCOUNTED_BW(); + /* Sendme on stream: not counted */ ENTRY_TO_CONN(entryconn)->outbuf_flushlen = 0; PACK_CELL(1, RELAY_COMMAND_SENDME, "Data1234"); |