diff options
author | trinity-1686a <trinity@deuxfleurs.fr> | 2023-10-10 16:04:41 +0200 |
---|---|---|
committer | trinity-1686a <trinity@deuxfleurs.fr> | 2023-10-12 18:44:54 +0200 |
commit | efc7159e0841376a35dcdac3e737822d96c6f9e5 (patch) | |
tree | 7f3f90726b714d68acd1c61e673ff5a364176c43 /src | |
parent | 660f4b8f4a3ff84a02d679aea4a5af8ddd24e2de (diff) | |
download | tor-efc7159e0841376a35dcdac3e737822d96c6f9e5.tar.gz tor-efc7159e0841376a35dcdac3e737822d96c6f9e5.zip |
fix bridge transport statistics
Diffstat (limited to 'src')
-rw-r--r-- | src/core/or/channeltls.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/core/or/channeltls.c b/src/core/or/channeltls.c index 1f5a466777..a79f5c36e8 100644 --- a/src/core/or/channeltls.c +++ b/src/core/or/channeltls.c @@ -360,13 +360,19 @@ channel_tls_handle_incoming(or_connection_t *orconn) /* Register it */ channel_register(chan); + char *transport_name = NULL; + if (channel_tls_get_transport_name_method(TLS_CHAN_TO_BASE(orconn->chan), + &transport_name) < 0) { + transport_name = NULL; + } /* Start tracking TLS connections in the DoS subsystem as soon as possible, * so we can protect against attacks that use partially open connections. */ geoip_note_client_seen(GEOIP_CLIENT_CONNECT, - &TO_CONN(orconn)->addr, NULL, + &TO_CONN(orconn)->addr, transport_name, time(NULL)); - dos_new_client_conn(orconn, NULL); + dos_new_client_conn(orconn, transport_name); + tor_free(transport_name); return chan; } |