]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: connection: define error for reverse connect
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 29 Sep 2023 14:31:25 +0000 (16:31 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 29 Sep 2023 16:08:26 +0000 (18:08 +0200)
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
src/connection.c

index b41663ce27e15d12130313a9d1af496946fe561b..5b25772d8296ae63acd02ea5cdb218ff99f0fd79 100644 (file)
@@ -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() */
index 96e8818e0e8f9f3d886e4589f722748571ac9e8f..8eb72ec79e461f2a15049a2c30f598f9e58cd1ff 100644 (file)
@@ -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;
 }