aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/channel.c
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/channel.c
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/channel.c')
-rw-r--r--src/core/or/channel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/or/channel.c b/src/core/or/channel.c
index fd7bf62789..3886906875 100644
--- a/src/core/or/channel.c
+++ b/src/core/or/channel.c
@@ -1871,7 +1871,7 @@ channel_do_open_actions(channel_t *chan)
tor_free(transport_name);
/* Notify the DoS subsystem of a new client. */
if (tlschan && tlschan->conn) {
- dos_new_client_conn(tlschan->conn);
+ dos_new_client_conn(tlschan->conn, transport_name);
}
}
/* Otherwise the underlying transport can't tell us this, so skip it */