From c8d8fa0d3639058544ffe153c1b83e0ed80bf43a Mon Sep 17 00:00:00 2001 From: David Goulet Date: Wed, 12 Oct 2022 09:25:01 -0400 Subject: relay: Add number of rejected connections to MetricsPort Related to #40194 Signed-off-by: David Goulet --- src/core/or/connection_edge.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/core/or/connection_edge.c') diff --git a/src/core/or/connection_edge.c b/src/core/or/connection_edge.c index ea4bf00735..7ba7ecc4c5 100644 --- a/src/core/or/connection_edge.c +++ b/src/core/or/connection_edge.c @@ -4206,6 +4206,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); connection_edge_end(edge_conn, END_STREAM_REASON_EXITPOLICY); circuit_detach_stream(circuit_get_by_edge_conn(edge_conn), edge_conn); connection_free(conn); @@ -4233,6 +4234,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); connection_edge_end(edge_conn, END_STREAM_REASON_CONNECTREFUSED); circuit_detach_stream(circuit_get_by_edge_conn(edge_conn), edge_conn); connection_free(conn); -- cgit v1.2.3-54-g00ecf