aboutsummaryrefslogtreecommitdiff
path: root/src/or/dos.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2018-01-29 11:50:11 -0500
committerDavid Goulet <dgoulet@torproject.org>2018-01-30 09:18:16 -0500
commite58a4fc6cfcdeafc2ebfb61fd3cf6d163ce2436c (patch)
tree3747d076cdafbdab0ebe518f006f79f2395c8ad2 /src/or/dos.h
parenta3714268f659998dc879ed723852440cd8be1b04 (diff)
downloadtor-e58a4fc6cfcdeafc2ebfb61fd3cf6d163ce2436c.tar.gz
tor-e58a4fc6cfcdeafc2ebfb61fd3cf6d163ce2436c.zip
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>
Diffstat (limited to 'src/or/dos.h')
-rw-r--r--src/or/dos.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/dos.h b/src/or/dos.h
index 9ce1baddb8..8695512ea6 100644
--- a/src/or/dos.h
+++ b/src/or/dos.h
@@ -70,7 +70,7 @@ void dos_note_refuse_single_hop_client(void);
/* DoSCircuitCreationMinConnections default */
#define DOS_CC_MIN_CONCURRENT_CONN_DEFAULT 3
/* DoSCircuitCreationRateTenths is 3 per seconds. */
-#define DOS_CC_CIRCUIT_RATE_TENTHS_DEFAULT (3 * 10)
+#define DOS_CC_CIRCUIT_RATE_DEFAULT 3
/* DoSCircuitCreationBurst default. */
#define DOS_CC_CIRCUIT_BURST_DEFAULT 90
/* DoSCircuitCreationDefenseTimePeriod in seconds. */