From ac1164de7ca694ccad5c39579f4a00a7aae2cc35 Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Fri, 29 Sep 2023 16:31:25 +0200 Subject: [PATCH] MINOR: connection: define error for reverse connect Define a new error code for connection CO_ER_REVERSE. This will be used to report an issue which happens on a connection targetted for reversal before reverse process is completed. --- include/haproxy/connection-t.h | 2 ++ src/connection.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/include/haproxy/connection-t.h b/include/haproxy/connection-t.h index b41663ce27..5b25772d82 100644 --- a/include/haproxy/connection-t.h +++ b/include/haproxy/connection-t.h @@ -241,6 +241,8 @@ enum { 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_REVERSE, /* Error during reverse connect */ }; /* error return codes for accept_conn() */ diff --git a/src/connection.c b/src/connection.c index 96e8818e0e..8eb72ec79e 100644 --- a/src/connection.c +++ b/src/connection.c @@ -725,6 +725,8 @@ const char *conn_err_code_str(struct connection *c) case CO_ER_SOCKS4_ABORT: return "SOCKS4 Proxy handshake aborted by server"; case CO_ERR_SSL_FATAL: return "SSL fatal error"; + + case CO_ER_REVERSE: return "Reverse connect failure"; } return NULL; } -- 2.39.5