[tor-commits] [tor/master] hs-v3: Rename HS DoS default defines
nickm at torproject.org
nickm at torproject.org
Wed Aug 7 13:52:13 UTC 2019
commit c45f0b4ec1b0bdc93c1aeb7342347f1b81eb9f1e
Author: David Goulet <dgoulet at torproject.org>
Date: Tue Jul 2 07:36:36 2019 -0400
hs-v3: Rename HS DoS default defines
Signed-off-by: David Goulet <dgoulet at torproject.org>
---
src/feature/hs/hs_dos.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/feature/hs/hs_dos.c b/src/feature/hs/hs_dos.c
index da898dc3a..a4586dd70 100644
--- a/src/feature/hs/hs_dos.c
+++ b/src/feature/hs/hs_dos.c
@@ -33,13 +33,13 @@
/* Default value of the allowed INTRODUCE2 cell rate per second. Above that
* value per second, the introduction is denied. */
-#define HS_DOS_INTRODUCE_CELL_RATE_PER_SEC 25
+#define HS_DOS_INTRODUCE_DEFAULT_CELL_RATE_PER_SEC 25
/* Default value of the allowed INTRODUCE2 cell burst per second. This is the
* maximum value a token bucket has per second. We thus allow up to this value
* of INTRODUCE2 cell per second but the bucket is refilled by the rate value
* but never goes above that burst value. */
-#define HS_DOS_INTRODUCE_CELL_BURST_PER_SEC 200
+#define HS_DOS_INTRODUCE_DEFAULT_CELL_BURST_PER_SEC 200
/* Default value of the consensus parameter enabling or disabling the
* introduction DoS defense. Disabled by default. */
@@ -47,9 +47,9 @@
/* Consensus parameters. */
static uint32_t hs_dos_introduce_rate_per_sec =
- HS_DOS_INTRODUCE_CELL_RATE_PER_SEC;
+ HS_DOS_INTRODUCE_DEFAULT_CELL_RATE_PER_SEC;
static uint32_t hs_dos_introduce_burst_per_sec =
- HS_DOS_INTRODUCE_CELL_BURST_PER_SEC;
+ HS_DOS_INTRODUCE_DEFAULT_CELL_BURST_PER_SEC;
static uint32_t hs_dos_introduce_enabled =
HS_DOS_INTRODUCE_ENABLED_DEFAULT;
@@ -65,7 +65,7 @@ static uint32_t
get_param_rate_per_sec(const networkstatus_t *ns)
{
return networkstatus_get_param(ns, "HiddenServiceEnableIntroDoSRatePerSec",
- HS_DOS_INTRODUCE_CELL_RATE_PER_SEC,
+ HS_DOS_INTRODUCE_DEFAULT_CELL_RATE_PER_SEC,
0, INT32_MAX);
}
@@ -74,7 +74,7 @@ static uint32_t
get_param_burst_per_sec(const networkstatus_t *ns)
{
return networkstatus_get_param(ns, "HiddenServiceEnableIntroDoSBurstPerSec",
- HS_DOS_INTRODUCE_CELL_BURST_PER_SEC,
+ HS_DOS_INTRODUCE_DEFAULT_CELL_BURST_PER_SEC,
0, INT32_MAX);
}
More information about the tor-commits
mailing list