BUG/MINOR: connection: Add missing error labels to conn_err_code_str
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Thu, 29 Jul 2021 07:45:48 +0000 (09:45 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 12 Aug 2021 14:52:51 +0000 (16:52 +0200)
The CO_ER_SSL_EARLY_FAILED and CO_ER_CIP_TIMEOUT connection error codes
were missing in the conn_err_code_str switch which converts the error
codes into string.

This patch can be backported on all stable branches.

(cherry picked from commit 0aa4130d6545ced3ad396f9a904fd6f579df291d)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit abc2d3c4268d9a4fcf2393b2502f207f400ac29b)
Signed-off-by: Willy Tarreau <w@1wt.eu>

include/haproxy/connection.h

index 4f18ae4..aa7a206 100644 (file)
@@ -686,6 +686,7 @@ static inline const char *conn_err_code_str(struct connection *c)
 
        case CO_ER_CIP_EMPTY:     return "Connection closed while waiting for NetScaler Client IP header";
        case CO_ER_CIP_ABORT:     return "Connection error while waiting for NetScaler Client IP header";
+       case CO_ER_CIP_TIMEOUT:   return "Timeout while waiting for a NetScaler Client IP header";
        case CO_ER_CIP_TRUNCATED: return "Truncated NetScaler Client IP header received";
        case CO_ER_CIP_BAD_MAGIC: return "Received an invalid NetScaler Client IP magic number";
        case CO_ER_CIP_BAD_PROTO: return "Received an unhandled protocol in the NetScaler Client IP header";
@@ -704,6 +705,7 @@ static inline const char *conn_err_code_str(struct connection *c)
        case CO_ER_SSL_HANDSHAKE_HB: return "SSL handshake failure after heartbeat";
        case CO_ER_SSL_KILLED_HB: return "Stopped a TLSv1 heartbeat attack (CVE-2014-0160)";
        case CO_ER_SSL_NO_TARGET: return "Attempt to use SSL on an unknown target (internal error)";
+       case CO_ER_SSL_EARLY_FAILED: return "Server refused early data";
 
        case CO_ER_SOCKS4_SEND:    return "SOCKS4 Proxy write error during handshake";
        case CO_ER_SOCKS4_RECV:    return "SOCKS4 Proxy read error during handshake";