[tor-commits] [tor/master] Bug 30173: Rate limit padding rate limit log message.
nickm at torproject.org
nickm at torproject.org
Mon May 13 18:35:30 UTC 2019
commit 17a164a8275970aed53076ba58296ffc424c3b75
Author: Mike Perry <mikeperry-git at torproject.org>
Date: Wed Apr 17 02:51:48 2019 +0000
Bug 30173: Rate limit padding rate limit log message.
Gotta limit to the limit when the limit is reached.
---
src/core/or/circuitpadding.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/core/or/circuitpadding.c b/src/core/or/circuitpadding.c
index f6385f32e..bf74ecc3f 100644
--- a/src/core/or/circuitpadding.c
+++ b/src/core/or/circuitpadding.c
@@ -1196,7 +1196,8 @@ circpad_machine_schedule_padding,(circpad_machine_runtime_t *mi))
"Padding machine has reached padding limit on circuit %u",
TO_ORIGIN_CIRCUIT(mi->on_circ)->global_identifier);
} else {
- log_fn(LOG_INFO, LD_CIRC,
+ static ratelim_t padding_lim = RATELIM_INIT(600);
+ log_fn_ratelim(&padding_lim,LOG_INFO,LD_CIRC,
"Padding machine has reached padding limit on circuit %"PRIu64
", %d",
mi->on_circ->n_chan ? mi->on_circ->n_chan->global_identifier : 0,
More information about the tor-commits
mailing list