summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2021-01-26 12:11:10 -0500
committerDavid Goulet <dgoulet@torproject.org>2021-02-22 15:48:52 -0500
commit45113b648b413989ca82d2c3be6afae1699cae43 (patch)
treed2223044533c9ebc0d11d41452546a536996f1b4 /src/core
parent99703eaca0f575e4739523ca815cf55329d16024 (diff)
downloadtor-45113b648b413989ca82d2c3be6afae1699cae43.tar.gz
tor-45113b648b413989ca82d2c3be6afae1699cae43.zip
test: Add DoS connection rate unit test
Related to #40253 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/or/dos.c2
-rw-r--r--src/core/or/dos.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/core/or/dos.c b/src/core/or/dos.c
index 0169a631c2..ba4e5442d6 100644
--- a/src/core/or/dos.c
+++ b/src/core/or/dos.c
@@ -210,7 +210,7 @@ get_param_conn_connect_rate(const networkstatus_t *ns)
/* Return the connection connect burst parameters either from the
* configuration file or, if not found, consensus parameter. */
-static uint32_t
+STATIC uint32_t
get_param_conn_connect_burst(const networkstatus_t *ns)
{
if (dos_get_options()->DoSConnectionConnectBurst) {
diff --git a/src/core/or/dos.h b/src/core/or/dos.h
index cadabdb2c9..3153a1fc5f 100644
--- a/src/core/or/dos.h
+++ b/src/core/or/dos.h
@@ -155,6 +155,7 @@ STATIC uint32_t get_param_conn_max_concurrent_count(
STATIC uint32_t get_param_cc_circuit_burst(const networkstatus_t *ns);
STATIC uint32_t get_param_cc_min_concurrent_connection(
const networkstatus_t *ns);
+STATIC uint32_t get_param_conn_connect_burst(const networkstatus_t *ns);
STATIC uint64_t get_circuit_rate_per_second(void);
STATIC void cc_stats_refill_bucket(cc_client_stats_t *stats,