Skip to content

Commit 3939579

Browse files
committed
CLEANUP: connection: properly name the CO_ER_SSL_FATAL enum entry
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 61944f7 ("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.
1 parent abed9e0 commit 3939579

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

include/haproxy/connection-t.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ enum {
238238
CO_ER_SOCKS4_DENY, /* SOCKS4 Proxy deny the request */
239239
CO_ER_SOCKS4_ABORT, /* SOCKS4 Proxy handshake aborted by server */
240240

241-
CO_ERR_SSL_FATAL, /* SSL fatal error during a SSL_read or SSL_write */
241+
CO_ER_SSL_FATAL, /* SSL fatal error during a SSL_read or SSL_write */
242242

243243
CO_ER_REVERSE, /* Error during reverse connect */
244244
};

src/connection.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ const char *conn_err_code_str(struct connection *c)
741741
case CO_ER_SOCKS4_DENY: return "SOCKS4 Proxy deny the request";
742742
case CO_ER_SOCKS4_ABORT: return "SOCKS4 Proxy handshake aborted by server";
743743

744-
case CO_ERR_SSL_FATAL: return "SSL fatal error";
744+
case CO_ER_SSL_FATAL: return "SSL fatal error";
745745

746746
case CO_ER_REVERSE: return "Reverse connect failure";
747747
}

src/ssl_sock.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5852,7 +5852,7 @@ static size_t ssl_sock_to_buf(struct connection *conn, void *xprt_ctx, struct bu
58525852
struct ssl_sock_ctx *ctx = conn_get_ssl_sock_ctx(conn);
58535853
if (ctx && !ctx->error_code)
58545854
ctx->error_code = ERR_peek_error();
5855-
conn->err_code = CO_ERR_SSL_FATAL;
5855+
conn->err_code = CO_ER_SSL_FATAL;
58565856
}
58575857
/* For SSL_ERROR_SYSCALL, make sure to clear the error
58585858
* 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
60286028

60296029
if (ctx && !ctx->error_code)
60306030
ctx->error_code = ERR_peek_error();
6031-
conn->err_code = CO_ERR_SSL_FATAL;
6031+
conn->err_code = CO_ER_SSL_FATAL;
60326032
}
60336033
goto out_error;
60346034
}

0 commit comments

Comments
 (0)