aboutsummaryrefslogtreecommitdiff
path: root/src/feature/rend
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2019-08-08 13:40:10 -0400
committerDavid Goulet <dgoulet@torproject.org>2019-08-08 13:40:10 -0400
commit2e5519da7cf4fb305d040fc07289b827a4d423a9 (patch)
tree12bec316a202ee6cd4b1d74e6b05c23d1f064e37 /src/feature/rend
parentb47adcbcabf8b07ffb19b0cfeb02996b07104ccf (diff)
downloadtor-2e5519da7cf4fb305d040fc07289b827a4d423a9.tar.gz
tor-2e5519da7cf4fb305d040fc07289b827a4d423a9.zip
hs: Initialize the INTRO2 bucket for legacy intro point
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/rend')
-rw-r--r--src/feature/rend/rendmid.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/feature/rend/rendmid.c b/src/feature/rend/rendmid.c
index 192da166ee..ef2a44c40d 100644
--- a/src/feature/rend/rendmid.c
+++ b/src/feature/rend/rendmid.c
@@ -117,6 +117,8 @@ 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());
log_info(LD_REND,
"Established introduction point on circuit %u for service %s",