aboutsummaryrefslogtreecommitdiff
path: root/src/core/mainloop/connection.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2020-08-25 15:43:00 +0300
committerGeorge Kadianakis <desnacked@riseup.net>2020-08-25 15:43:00 +0300
commitcc4e42ee3257d5157172cedb73ed86ba88ca271d (patch)
treef2f0aadbe7493da5c717912cc5c0386c253d16a7 /src/core/mainloop/connection.c
parent6dc0b043199d28866cdb466e18caebbf0b051c04 (diff)
parent24c721de37d2e10f5c864c2e8001f1468a8a4506 (diff)
downloadtor-cc4e42ee3257d5157172cedb73ed86ba88ca271d.tar.gz
tor-cc4e42ee3257d5157172cedb73ed86ba88ca271d.zip
Merge remote-tracking branch 'tor-gitlab/mr/115'
Diffstat (limited to 'src/core/mainloop/connection.c')
-rw-r--r--src/core/mainloop/connection.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/mainloop/connection.c b/src/core/mainloop/connection.c
index 7f4c6a5f48..82886ccd0b 100644
--- a/src/core/mainloop/connection.c
+++ b/src/core/mainloop/connection.c
@@ -82,6 +82,7 @@
#include "core/or/policies.h"
#include "core/or/reasons.h"
#include "core/or/relay.h"
+#include "core/or/status.h"
#include "core/or/crypt_path.h"
#include "core/proto/proto_haproxy.h"
#include "core/proto/proto_http.h"
@@ -2042,6 +2043,9 @@ connection_handle_listener_read(connection_t *conn, int new_type)
connection_mark_for_close(newconn);
return 0;
}
+
+ note_connection(true /* inbound */, conn->socket_family);
+
return 0;
}
@@ -2213,6 +2217,8 @@ connection_connect_sockaddr,(connection_t *conn,
}
}
+ note_connection(false /* outbound */, conn->socket_family);
+
/* it succeeded. we're connected. */
log_fn(inprogress ? LOG_DEBUG : LOG_INFO, LD_NET,
"Connection to socket %s (sock "TOR_SOCKET_T_FORMAT").",