aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/relay.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2022-10-17 11:34:57 -0400
committerDavid Goulet <dgoulet@torproject.org>2022-10-26 14:05:28 -0400
commita2c034d8f514cea2ce2f700a76ec22d29e584067 (patch)
tree2d37c9ba19be0af7c81b9b00b93438315ba9fd10 /src/core/or/relay.h
parente86833ade650104d610327432f2e646d13f6a2a2 (diff)
downloadtor-a2c034d8f514cea2ce2f700a76ec22d29e584067.tar.gz
tor-a2c034d8f514cea2ce2f700a76ec22d29e584067.zip
dos: Apply circuit creation defenses if circ max queue cell reached
This adds two consensus parameters to control the outbound max circuit queue cell size limit and how many times it is allowed to reach that limit for a single client IP. Closes #40680 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/core/or/relay.h')
-rw-r--r--src/core/or/relay.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/or/relay.h b/src/core/or/relay.h
index eac920f491..71e07562cd 100644
--- a/src/core/or/relay.h
+++ b/src/core/or/relay.h
@@ -17,6 +17,8 @@ extern uint64_t stats_n_relay_cells_delivered;
extern uint64_t stats_n_circ_max_cell_reached;
void relay_consensus_has_changed(const networkstatus_t *ns);
+uint32_t relay_get_param_max_circuit_cell_queue_size(
+ const networkstatus_t *ns);
int circuit_receive_relay_cell(cell_t *cell, circuit_t *circ,
cell_direction_t cell_direction);
size_t cell_queues_get_total_allocation(void);