]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: connection: properly name the CO_ER_SSL_FATAL enum entry
authorWilly Tarreau <w@1wt.eu>
Tue, 5 Nov 2024 17:05:58 +0000 (18:05 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 5 Nov 2024 17:57:42 +0000 (18:57 +0100)
It was the only one prefixed with "CO_ERR_", making it harder to batch
process and to look up. It was added in 2.5 by commit 61944f7a73 ("MINOR:
ssl: Set connection error code in case of SSL read or write fatal failure")
so it can be backported as far as 2.6 if needed to help integrate other
patches.

include/haproxy/connection-t.h
src/connection.c
src/ssl_sock.c

index 228f2078c4e17585838ef7590df15ecd816006ce..ad454a320ea962b14169a147980f305c1ff070a0 100644 (file)
@@ -238,7 +238,7 @@ enum {
        CO_ER_SOCKS4_DENY,       /* SOCKS4 Proxy deny the request */
        CO_ER_SOCKS4_ABORT,      /* SOCKS4 Proxy handshake aborted by server */
 
-       CO_ERR_SSL_FATAL,        /* SSL fatal error during a SSL_read or SSL_write */
+       CO_ER_SSL_FATAL,         /* SSL fatal error during a SSL_read or SSL_write */
 
        CO_ER_REVERSE,           /* Error during reverse connect */
 };
index 1b644b0be55c4774871f1ba9f9df4ae655d71a40..59baec65b67c2efce79665d65e5cbfd7a1d4ac03 100644 (file)
@@ -741,7 +741,7 @@ const char *conn_err_code_str(struct connection *c)
        case CO_ER_SOCKS4_DENY:    return "SOCKS4 Proxy deny the request";
        case CO_ER_SOCKS4_ABORT:   return "SOCKS4 Proxy handshake aborted by server";
 
-       case CO_ERR_SSL_FATAL:     return "SSL fatal error";
+       case CO_ER_SSL_FATAL:      return "SSL fatal error";
 
        case CO_ER_REVERSE:        return "Reverse connect failure";
        }
index 54550f00deb2d69524f7e5a2cd6fbe71463420ca..7ec5bf15ddb6e073b07c3a00c0afdb59b8628c9c 100644 (file)
@@ -5852,7 +5852,7 @@ static size_t ssl_sock_to_buf(struct connection *conn, void *xprt_ctx, struct bu
                                struct ssl_sock_ctx *ctx = conn_get_ssl_sock_ctx(conn);
                                if (ctx && !ctx->error_code)
                                        ctx->error_code = ERR_peek_error();
-                               conn->err_code = CO_ERR_SSL_FATAL;
+                               conn->err_code = CO_ER_SSL_FATAL;
                        }
                        /* For SSL_ERROR_SYSCALL, make sure to clear the error
                         * stack before shutting down the connection for
@@ -6028,7 +6028,7 @@ static size_t ssl_sock_from_buf(struct connection *conn, void *xprt_ctx, const s
 
                                if (ctx && !ctx->error_code)
                                        ctx->error_code = ERR_peek_error();
-                               conn->err_code = CO_ERR_SSL_FATAL;
+                               conn->err_code = CO_ER_SSL_FATAL;
                        }
                        goto out_error;
                }