diff options
author | teor <teor2345@gmail.com> | 2018-01-31 11:13:17 +1100 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2018-01-31 09:27:59 -0500 |
commit | a09d5f5735abe2e1d16cf0ee9389ae096d5e7ef1 (patch) | |
tree | 8da5a5cd387ec6a86fa2697e74103c849a842f92 /src/test | |
parent | b45ae1b00237f0209c4ccce777de59581fda5e39 (diff) | |
download | tor-a09d5f5735abe2e1d16cf0ee9389ae096d5e7ef1.tar.gz tor-a09d5f5735abe2e1d16cf0ee9389ae096d5e7ef1.zip |
dos: Make sure cc_stats_refill_bucket can't overflow while calculating
Debug log the elapsed time in cc_stats_refill_bucket
Part of #25094.
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test_dos.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test_dos.c b/src/test/test_dos.c index 80abc19377..7fe5495603 100644 --- a/src/test/test_dos.c +++ b/src/test/test_dos.c @@ -176,7 +176,7 @@ test_dos_bucket_refill(void *arg) /* Initialize DoS subsystem and get relevant limits */ dos_init(); uint32_t max_circuit_count = get_param_cc_circuit_burst(NULL); - int circ_rate = get_circuit_rate_per_second(); + uint64_t circ_rate = get_circuit_rate_per_second(); /* Check that the circuit rate is a positive number and smaller than the max * circuit count */ tt_int_op(circ_rate, OP_GT, 1); |