diff options
author | teor <teor@torproject.org> | 2020-03-17 23:11:31 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2020-03-17 23:11:31 +1000 |
commit | 44f92e8e4278403b9e633668f8be70f197b6e8db (patch) | |
tree | fb28ada7d8d31423f3d8225af57fb6348d7b5bd9 /src/core | |
parent | c86d08e3e6a4210fb10ab0d00ba22bb9e9d1ffde (diff) | |
parent | 894ff2dc8422cb86312c512698acd76476224f87 (diff) | |
download | tor-44f92e8e4278403b9e633668f8be70f197b6e8db.tar.gz tor-44f92e8e4278403b9e633668f8be70f197b6e8db.zip |
Merge remote-tracking branch 'tor-github/pr/1784'
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/or/channel.c | 2 | ||||
-rw-r--r-- | src/core/or/dos.c | 4 | ||||
-rw-r--r-- | src/core/or/dos.h | 3 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/core/or/channel.c b/src/core/or/channel.c index ce1c31914c..160ab587f5 100644 --- a/src/core/or/channel.c +++ b/src/core/or/channel.c @@ -1859,7 +1859,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 */ diff --git a/src/core/or/dos.c b/src/core/or/dos.c index be64b6286e..5f99280030 100644 --- a/src/core/or/dos.c +++ b/src/core/or/dos.c @@ -680,7 +680,7 @@ dos_log_heartbeat(void) /* Called when a new client connection has been established on the given * address. */ void -dos_new_client_conn(or_connection_t *or_conn) +dos_new_client_conn(or_connection_t *or_conn, const char *transport_name) { clientmap_entry_t *entry; @@ -701,7 +701,7 @@ dos_new_client_conn(or_connection_t *or_conn) } /* We are only interested in client connection from the geoip cache. */ - entry = geoip_lookup_client(&or_conn->real_addr, NULL, + entry = geoip_lookup_client(&or_conn->real_addr, transport_name, GEOIP_CLIENT_CONNECT); if (BUG(entry == NULL)) { /* Should never happen because we note down the address in the geoip diff --git a/src/core/or/dos.h b/src/core/or/dos.h index b7b1d3f635..b3eca058b8 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); |