aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/dos.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2020-03-10 14:45:13 -0400
committerDavid Goulet <dgoulet@torproject.org>2020-03-10 14:45:13 -0400
commit894ff2dc8422cb86312c512698acd76476224f87 (patch)
tree6be4ed48b020021d68cb54d10ec61b7382382fef /src/core/or/dos.h
parentb9c7c61ea5233854ff83257a8bc530b7e0a50351 (diff)
downloadtor-894ff2dc8422cb86312c512698acd76476224f87.tar.gz
tor-894ff2dc8422cb86312c512698acd76476224f87.zip
dos: Pass transport name on new client connection
For a bridge configured with a pluggable transport, the transport name is used, with the IP address, for the GeoIP client cache entry. However, the DoS subsystem was not aware of it and always passing NULL when doing a lookup into the GeoIP cache. This resulted in bridges with a PT are never able to apply DoS defenses for newly created connections. Fixes #33491 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/core/or/dos.h')
-rw-r--r--src/core/or/dos.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/or/dos.h b/src/core/or/dos.h
index 95448d0530..058b7afce6 100644
--- a/src/core/or/dos.h
+++ b/src/core/or/dos.h
@@ -53,7 +53,8 @@ int dos_enabled(void);
void dos_log_heartbeat(void);
void dos_geoip_entry_about_to_free(const struct clientmap_entry_t *geoip_ent);
-void dos_new_client_conn(or_connection_t *or_conn);
+void dos_new_client_conn(or_connection_t *or_conn,
+ const char *transport_name);
void dos_close_client_conn(const or_connection_t *or_conn);
int dos_should_refuse_single_hop_client(void);