aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/connection_edge.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2022-11-03 13:05:21 -0400
committerDavid Goulet <dgoulet@torproject.org>2022-11-03 13:05:21 -0400
commit6196e9596a3a10d5b8d2d6574635306d48092388 (patch)
treee75f94d366ba5be04828ff2bba6d82e3a2343dbe /src/core/or/connection_edge.c
parent619dd35321c13684d5496b660a3404d2d3fe2827 (diff)
downloadtor-6196e9596a3a10d5b8d2d6574635306d48092388.tar.gz
tor-6196e9596a3a10d5b8d2d6574635306d48092388.zip
metrics: Add connection socket family to metrics
Adds either ipv4 or ipv6 to the "tor_relay_connections_total" stats. Closes #40710 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/core/or/connection_edge.c')
-rw-r--r--src/core/or/connection_edge.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/or/connection_edge.c b/src/core/or/connection_edge.c
index 5ef7a0982b..2b600385e0 100644
--- a/src/core/or/connection_edge.c
+++ b/src/core/or/connection_edge.c
@@ -4209,7 +4209,7 @@ connection_exit_connect(edge_connection_t *edge_conn)
log_info(LD_EXIT,"%s failed exit policy%s. Closing.",
connection_describe(conn),
why_failed_exit_policy);
- rep_hist_note_conn_rejected(conn->type);
+ rep_hist_note_conn_rejected(conn->type, conn->socket_family);
connection_edge_end(edge_conn, END_STREAM_REASON_EXITPOLICY);
circuit_detach_stream(circuit_get_by_edge_conn(edge_conn), edge_conn);
connection_free(conn);
@@ -4237,7 +4237,7 @@ connection_exit_connect(edge_connection_t *edge_conn)
nodelist_reentry_contains(&conn->addr, conn->port)) {
log_info(LD_EXIT, "%s tried to connect back to a known relay address. "
"Closing.", connection_describe(conn));
- rep_hist_note_conn_rejected(conn->type);
+ rep_hist_note_conn_rejected(conn->type, conn->socket_family);
connection_edge_end(edge_conn, END_STREAM_REASON_CONNECTREFUSED);
circuit_detach_stream(circuit_get_by_edge_conn(edge_conn), edge_conn);
connection_free(conn);