]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: connection: use conn_fd() when displaying connection errors
authorWilly Tarreau <w@1wt.eu>
Mon, 11 Apr 2022 16:01:28 +0000 (18:01 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 11 Apr 2022 17:31:47 +0000 (19:31 +0200)
The SSL connection errors and socks4 proxy errors used to blindly dump
the FD, now it's sanitized via conn_fd().

src/connection.c
src/ssl_sock.c

index 2302fd9ecbd9ff5f8fd28b620cec2617145a5948..af453a6b8657b269dc3f99d5e59150c4563a0e16 100644 (file)
@@ -1404,7 +1404,7 @@ int conn_send_socks4_proxy_request(struct connection *conn)
                                (conn->subs && conn->subs->events & SUB_RETRY_SEND) ? CO_SFL_MSG_MORE : 0);
 
                DPRINTF(stderr, "SOCKS PROXY HS FD[%04X]: Before send remain is [%d], sent [%d]\n",
-                               conn->handle.fd, -conn->send_proxy_ofs, ret);
+                       conn_fd(conn), -conn->send_proxy_ofs, ret);
 
                if (ret < 0) {
                        goto out_error;
index de0965dc8e59ac66685b39418274d5fcf6184008..748ab13241df7feb6e26bfb759341a648483badb 100644 (file)
@@ -620,7 +620,7 @@ static forceinline void ssl_sock_dump_errors(struct connection *conn)
                        if (ret == 0)
                                return;
                        fprintf(stderr, "fd[%#x] OpenSSL error[0x%lx] %s: %s\n",
-                               conn->handle.fd, ret,
+                               conn_fd(conn), ret,
                                func, ERR_reason_error_string(ret));
                }
        }