diff options
author | David Goulet <dgoulet@torproject.org> | 2022-11-08 15:25:08 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2022-11-08 15:25:08 -0500 |
commit | 5b0103cfb4a8e3c9807eab8d381cff0cf65d7ab8 (patch) | |
tree | 254c05c53fff5395e0f905d55f98605db93af1ed /src/core/mainloop/connection.c | |
parent | 00633bc619046e09536d742e5f862d75c35e476f (diff) | |
parent | 6196e9596a3a10d5b8d2d6574635306d48092388 (diff) | |
download | tor-5b0103cfb4a8e3c9807eab8d381cff0cf65d7ab8.tar.gz tor-5b0103cfb4a8e3c9807eab8d381cff0cf65d7ab8.zip |
Merge branch 'tor-gitlab/mr/651' into 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 0a39a7b1ff..b0b297ac57 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; } |