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 b41663c..5b25772 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 96e8818..8eb72ec 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;
 }