summaryrefslogtreecommitdiff
path: root/src/test/test_hs_dos.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2019-08-14 10:41:40 -0400
committerGeorge Kadianakis <desnacked@riseup.net>2019-08-26 15:53:46 +0300
commit1c554334ac6a7d39c69ec8dd26702a613bb899b4 (patch)
treeb364358755326258c10c7ce69975a0bc7d446ea5 /src/test/test_hs_dos.c
parent4c71accc49616e00cfaa021ee5c87b34cd0220d2 (diff)
downloadtor-1c554334ac6a7d39c69ec8dd26702a613bb899b4.tar.gz
tor-1c554334ac6a7d39c69ec8dd26702a613bb899b4.zip
test: Adapt HS DoS test to use latest parameter
We added a flag on the circuit to know if the DoS defenses are enabled or not. Before, it was solely the consensus parameter. Part of #30924 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/test/test_hs_dos.c')
-rw-r--r--src/test/test_hs_dos.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/test_hs_dos.c b/src/test/test_hs_dos.c
index e2b211d5df..f92d953fa6 100644
--- a/src/test/test_hs_dos.c
+++ b/src/test/test_hs_dos.c
@@ -57,6 +57,7 @@ test_can_send_intro2(void *arg)
/* Make that circuit a service intro point. */
circuit_change_purpose(TO_CIRCUIT(or_circ), CIRCUIT_PURPOSE_INTRO_POINT);
+ or_circ->introduce2_dos_defense_enabled = 1;
/* Initialize the INTRODUCE2 token bucket for the rate limiting. */
token_bucket_ctr_init(&or_circ->introduce2_bucket,
hs_dos_get_intro2_rate_param(),