]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
DEBUG: ssl-sock/show_fd: Display SSL error code
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 14 Mar 2023 14:51:33 +0000 (15:51 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 14 Mar 2023 14:51:34 +0000 (15:51 +0100)
Like for connection error code, when FD are dumps, the ssl error code is now
displayed. This may help to diagnose why a connection error occurred.

This patch may be backported to help debugging.

src/ssl_sock.c

index 97d2c3bb437ae15371d4225f6fb85087f1a6d4dc..fc9de557694935884342fd9e1e70db68b7627ddf 100644 (file)
@@ -6998,7 +6998,7 @@ static int ssl_sock_show_fd(struct buffer *buf, const struct connection *conn, c
                chunk_appendf(&trash, " xctx.conn=%p(BOGUS)", sctx->conn);
                ret = 1;
        }
-       chunk_appendf(&trash, " xctx.st=%d", sctx->xprt_st);
+       chunk_appendf(&trash, " xctx.st=%d .err=%ld", sctx->xprt_st, sctx->error_code);
 
        if (sctx->xprt) {
                chunk_appendf(&trash, " .xprt=%s", sctx->xprt->name);