From c440a0ded9bef20b32c6f86b27cdf5ab52e1e16f Mon Sep 17 00:00:00 2001 From: Omar Polo Date: Mon, 28 Aug 2023 21:42:58 +0000 Subject: log ip address and port when tls_handshake fails These connection are not otherwise logged and it could be helpful to track down the bad ip. --- server.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'server.c') diff --git a/server.c b/server.c index 2c91310..9aee9da 100644 --- a/server.c +++ b/server.c @@ -373,7 +373,8 @@ handle_handshake(int fd, short ev, void *d) case 0: /* success */ break; case -1: - log_warnx("tls_handshake failed: %s", tls_error(c->ctx)); + log_warnx("(%s:%s) tls_handshake failed: %s", + c->rhost, c->rserv, tls_error(c->ctx)); client_close(c); return; case TLS_WANT_POLLIN: -- cgit v1.2.3