dos: Make circuit rate limit per second, not tenths anymore

Because this touches too many commits at once, it is made into one single
commit.

Remove the use of "tenths" for the circuit rate to simplify things. We can
only refill the buckets at best once every second because of the use of
approx_time() and our token system is set to be 1 token = 1 circuit so make
the rate a flat integer of circuit per second.

Signed-off-by: David Goulet <dgoulet@torproject.org>
This commit is contained in:
David Goulet
2018-01-29 11:50:11 -05:00
parent a3714268f6
commit e58a4fc6cf
5 changed files with 15 additions and 34 deletions
+3 -5
View File
@@ -2466,12 +2466,10 @@ Denial of Service mitigation subsystem.
parameter.
(Default: 0)
[[DoSCircuitCreationRateTenths]] **DoSCircuitCreationRateTenths** __NUM__::
[[DoSCircuitCreationRate]] **DoSCircuitCreationRate** __NUM__::
The allowed circuit creation rate in tenths of circuit per second applied
per client IP address. For example, if you want to set a rate of 5
circuits per second allowed per IP address, this value should be set to
50. If this option is 0, it obeys a consensus parameter. (Default: 0)
The allowed circuit creation rate per second applied per client IP
address. If this option is 0, it obeys a consensus parameter. (Default: 0)
[[DoSCircuitCreationBurst]] **DoSCircuitCreationBurst** __NUM__::