diff options
author | David Goulet <dgoulet@torproject.org> | 2019-08-20 08:55:26 -0400 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2019-08-26 15:53:47 +0300 |
commit | a98f5099c4c58c25826835fbfc3ce708e5d378fd (patch) | |
tree | ebfa4752c35fc004fd396d475879b0eff825b326 /src/feature/hs/hs_dos.c | |
parent | 94a22217082f99bb7d5409e22af69d45def52889 (diff) | |
download | tor-a98f5099c4c58c25826835fbfc3ce708e5d378fd.tar.gz tor-a98f5099c4c58c25826835fbfc3ce708e5d378fd.zip |
hs-v3: Missing intro circuit INTRO2 DoS enabled flag
When consensus changes, we also need to update the circuit INTRO2 defenses
enabled flag and not only the token bucket.
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/hs/hs_dos.c')
-rw-r--r-- | src/feature/hs/hs_dos.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/feature/hs/hs_dos.c b/src/feature/hs/hs_dos.c index a7a43b9bc3..c7d420195d 100644 --- a/src/feature/hs/hs_dos.c +++ b/src/feature/hs/hs_dos.c @@ -88,6 +88,9 @@ update_intro_circuits(void) smartlist_t *intro_circs = hs_circuitmap_get_all_intro_circ_relay_side(); SMARTLIST_FOREACH_BEGIN(intro_circs, circuit_t *, circ) { + /* Defenses might have been enabled or disabled. */ + TO_OR_CIRCUIT(circ)->introduce2_dos_defense_enabled = + consensus_param_introduce_defense_enabled; /* Adjust the rate/burst value that might have changed. */ token_bucket_ctr_adjust(&TO_OR_CIRCUIT(circ)->introduce2_bucket, consensus_param_introduce_rate_per_sec, |