diff options
author | David Goulet <dgoulet@torproject.org> | 2019-08-20 08:35:21 -0400 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2019-08-26 15:53:46 +0300 |
commit | 82639a8c7bf59bb6ae73218cd78cee07b6586d96 (patch) | |
tree | 0d4b3e2d2575a091320ccd111e14f6b53a20359f /src/feature/rend | |
parent | f95b5d07c1a0407a60ca6335c032ec7a01b28968 (diff) | |
download | tor-82639a8c7bf59bb6ae73218cd78cee07b6586d96.tar.gz tor-82639a8c7bf59bb6ae73218cd78cee07b6586d96.zip |
hs-v3: Move to hs_dos.c INTRO2 defenses initialization
A bit cleaner especially that the next commit(s) will make the consensus param
interface private to hs_dos.c so we expose as little as we can outside of the
subsystem.
Part of #30924
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/rend')
-rw-r--r-- | src/feature/rend/rendmid.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/feature/rend/rendmid.c b/src/feature/rend/rendmid.c index ef2a44c40d..be3d66fc43 100644 --- a/src/feature/rend/rendmid.c +++ b/src/feature/rend/rendmid.c @@ -117,8 +117,7 @@ rend_mid_establish_intro_legacy(or_circuit_t *circ, const uint8_t *request, /* Now, set up this circuit. */ circuit_change_purpose(TO_CIRCUIT(circ), CIRCUIT_PURPOSE_INTRO_POINT); hs_circuitmap_register_intro_circ_v2_relay_side(circ, (uint8_t *)pk_digest); - token_bucket_ctr_init(&circ->introduce2_bucket, hs_dos_get_intro2_rate(), - hs_dos_get_intro2_burst(), (uint32_t) approx_time()); + hs_dos_setup_default_intro2_defenses(circ); log_info(LD_REND, "Established introduction point on circuit %u for service %s", |