summaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2018-01-25 16:05:59 -0500
committerDavid Goulet <dgoulet@torproject.org>2018-01-30 09:18:15 -0500
commitc05272783d0164363023ddd4b3ee93c2e12c8911 (patch)
tree3640c136f039852247d4cb8ec6967939512b4680 /src/or/or.h
parent51fda85c23e5ff2cabbc66ea19b006c4cb04b1e2 (diff)
downloadtor-c05272783d0164363023ddd4b3ee93c2e12c8911.tar.gz
tor-c05272783d0164363023ddd4b3ee93c2e12c8911.zip
dos: Track new and closed OR client connections
Implement a basic connection tracking that counts the number of concurrent connections when they open and close. This commit also adds the circuit creation mitigation data structure that will be needed at later commit to keep track of the circuit rate. Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/or.h b/src/or/or.h
index 2cf9e97356..454d05ed52 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -1500,6 +1500,10 @@ typedef struct or_connection_t {
/** True iff this connection has had its bootstrap failure logged with
* control_event_bootstrap_problem. */
unsigned int have_noted_bootstrap_problem:1;
+ /** True iff this is a client connection and its address has been put in the
+ * geoip cache and handled by the DoS mitigation subsystem. We use this to
+ * insure we have a coherent count of concurrent connection. */
+ unsigned int tracked_for_dos_mitigation : 1;
uint16_t link_proto; /**< What protocol version are we using? 0 for
* "none negotiated yet." */