diff options
author | David Goulet <dgoulet@torproject.org> | 2018-01-25 16:28:54 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2018-01-30 09:18:15 -0500 |
commit | acf7ea77d8d76830924a14145afbcf3c95a06b0e (patch) | |
tree | 83fa38059defe75af1dbcb905370c0b79ed25082 /src/or/dos.h | |
parent | 1bfc91a029839f36e04c8204d1bccaa04a5c2afd (diff) | |
download | tor-acf7ea77d8d76830924a14145afbcf3c95a06b0e.tar.gz tor-acf7ea77d8d76830924a14145afbcf3c95a06b0e.zip |
dos: Add the connection DoS mitigation subsystem
Defend against an address that has reached the concurrent connection count
threshold.
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/dos.h')
-rw-r--r-- | src/or/dos.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/dos.h b/src/or/dos.h index fa86295cf6..cc7749836f 100644 --- a/src/or/dos.h +++ b/src/or/dos.h @@ -107,6 +107,8 @@ typedef enum dos_conn_defense_type_t { DOS_CONN_DEFENSE_MAX = 2, } dos_conn_defense_type_t; +dos_conn_defense_type_t dos_conn_addr_get_defense_type(const tor_addr_t *addr); + #ifdef DOS_PRIVATE STATIC uint32_t get_param_conn_max_concurrent_count( |