diff options
author | David Goulet <dgoulet@torproject.org> | 2022-11-08 15:26:44 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2022-11-08 15:26:44 -0500 |
commit | 8b8873b759183d2f6d3a92cff2773ca74d1a4ce8 (patch) | |
tree | 82a6d5ece9d7bc3f3ce4d1f250243d97d5e9788e /src/core/mainloop/connection.c | |
parent | 56ee2131f19c462e2e4be294b61128a10b8ce374 (diff) | |
parent | 5b0103cfb4a8e3c9807eab8d381cff0cf65d7ab8 (diff) | |
download | tor-8b8873b759183d2f6d3a92cff2773ca74d1a4ce8.tar.gz tor-8b8873b759183d2f6d3a92cff2773ca74d1a4ce8.zip |
Merge branch 'maint-0.4.7'
Diffstat (limited to 'src/core/mainloop/connection.c')
-rw-r--r-- | src/core/mainloop/connection.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/mainloop/connection.c b/src/core/mainloop/connection.c index 8b0ef9a951..9a91c545b2 100644 --- a/src/core/mainloop/connection.c +++ b/src/core/mainloop/connection.c @@ -659,7 +659,7 @@ listener_connection_new(int type, int socket_family) connection_init(time(NULL), TO_CONN(listener_conn), type, socket_family); /* Listener connections aren't accounted for with note_connection() so do * this explicitly so to count them. */ - rep_hist_note_conn_opened(false, type); + rep_hist_note_conn_opened(false, type, socket_family); return listener_conn; } @@ -1163,7 +1163,8 @@ connection_mark_for_close_internal_, (connection_t *conn, conn->timestamp_last_write_allowed = time(NULL); /* Note the connection close. */ - rep_hist_note_conn_closed(conn->from_listener, conn->type); + rep_hist_note_conn_closed(conn->from_listener, conn->type, + conn->socket_family); } /** Find each connection that has hold_open_until_flushed set to @@ -2011,7 +2012,7 @@ connection_handle_listener_read(connection_t *conn, int new_type) log_notice(LD_APP, "Denying socks connection from untrusted address %s.", fmt_and_decorate_addr(&addr)); - rep_hist_note_conn_rejected(new_type); + rep_hist_note_conn_rejected(new_type, conn->socket_family); tor_close_socket(news); return 0; } @@ -2021,7 +2022,7 @@ connection_handle_listener_read(connection_t *conn, int new_type) if (dir_policy_permits_address(&addr) == 0) { log_notice(LD_DIRSERV,"Denying dir connection from address %s.", fmt_and_decorate_addr(&addr)); - rep_hist_note_conn_rejected(new_type); + rep_hist_note_conn_rejected(new_type, conn->socket_family); tor_close_socket(news); return 0; } @@ -2030,7 +2031,7 @@ connection_handle_listener_read(connection_t *conn, int new_type) /* Assess with the connection DoS mitigation subsystem if this address * can open a new connection. */ if (dos_conn_addr_get_defense_type(&addr) == DOS_CONN_DEFENSE_CLOSE) { - rep_hist_note_conn_rejected(new_type); + rep_hist_note_conn_rejected(new_type, conn->socket_family); tor_close_socket(news); return 0; } |