aboutsummaryrefslogtreecommitdiff
path: root/src/feature/hs
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2019-08-20 10:59:04 -0400
committerNick Mathewson <nickm@torproject.org>2019-09-09 11:07:51 -0400
commit622c2c7884fd656b5140245c4695a5a145dc04fd (patch)
tree919c826ca57ff1bafd646148a025ccd54067c491 /src/feature/hs
parent385f6bcfccbc327f42e5139ac8136086e79fbb17 (diff)
downloadtor-622c2c7884fd656b5140245c4695a5a145dc04fd.tar.gz
tor-622c2c7884fd656b5140245c4695a5a145dc04fd.zip
hs-v3: Rename validation function in hs_intropoint.c
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/hs')
-rw-r--r--src/feature/hs/hs_intropoint.c8
-rw-r--r--src/feature/hs/hs_intropoint.h6
2 files changed, 7 insertions, 7 deletions
diff --git a/src/feature/hs/hs_intropoint.c b/src/feature/hs/hs_intropoint.c
index fb2ac52e5b..90a7f28943 100644
--- a/src/feature/hs/hs_intropoint.c
+++ b/src/feature/hs/hs_intropoint.c
@@ -186,8 +186,8 @@ hs_intro_send_intro_established_cell,(or_circuit_t *circ))
* bound check and can be used. Else return false. See proposal 305 for
* details and reasons about this validation. */
STATIC bool
-validate_cell_dos_extension_parameters(uint64_t intro2_rate_per_sec,
- uint64_t intro2_burst_per_sec)
+cell_dos_extension_parameters_are_valid(uint64_t intro2_rate_per_sec,
+ uint64_t intro2_burst_per_sec)
{
bool ret = false;
@@ -296,8 +296,8 @@ handle_establish_intro_cell_dos_extension(
}
/* If invalid, we disable the defense on the circuit. */
- if (!validate_cell_dos_extension_parameters(intro2_rate_per_sec,
- intro2_burst_per_sec)) {
+ if (!cell_dos_extension_parameters_are_valid(intro2_rate_per_sec,
+ intro2_burst_per_sec)) {
circ->introduce2_dos_defense_enabled = 0;
log_info(LD_REND, "Disabling INTRO2 DoS defenses on circuit id %u",
circ->p_circ_id);
diff --git a/src/feature/hs/hs_intropoint.h b/src/feature/hs/hs_intropoint.h
index 1bebcacd80..94ebf021e4 100644
--- a/src/feature/hs/hs_intropoint.h
+++ b/src/feature/hs/hs_intropoint.h
@@ -57,9 +57,9 @@ STATIC int handle_introduce1(or_circuit_t *client_circ,
const uint8_t *request, size_t request_len);
STATIC int validate_introduce1_parsed_cell(const trn_cell_introduce1_t *cell);
STATIC int circuit_is_suitable_for_introduce1(const or_circuit_t *circ);
-STATIC bool validate_cell_dos_extension_parameters(
- uint64_t intro2_rate_per_sec,
- uint64_t intro2_burst_per_sec);
+STATIC bool cell_dos_extension_parameters_are_valid(
+ uint64_t intro2_rate_per_sec,
+ uint64_t intro2_burst_per_sec);
#endif /* defined(HS_INTROPOINT_PRIVATE) */