"CONNECTION_ID_LIMIT_ERROR",
"PROTOCOL_VIOLATION",
"INVALID_TOKEN",
- "",
+ "unknown error 0xC",
"CRYPTO_BUFFER_EXCEEDED",
- "",
+ "unknown error 0xE",
+ "unknown error 0xF",
"CRYPTO_ERROR",
};
u_char *
ngx_quic_error_text(uint64_t error_code)
{
+
+ if (error_code >= NGX_QUIC_ERR_LAST) {
+ return (u_char *) "unknown error";
+ }
+
return (u_char *) ngx_quic_errors[error_code];
}
if (f->type == NGX_QUIC_FT_CONNECTION_CLOSE) {
- if (f->u.close.error_code >= NGX_QUIC_ERR_LAST) {
- ngx_log_error(NGX_LOG_INFO, pkt->log, 0,
- "unkown error code: %ui, truncated",
- f->u.close.error_code);
- f->u.close.error_code = NGX_QUIC_ERR_LAST - 1;
- }
-
ngx_log_debug4(NGX_LOG_DEBUG_EVENT, pkt->log, 0,
"CONN.CLOSE: { %s (0x%xi) type=0x%xi reason='%V'}",
ngx_quic_error_text(f->u.close.error_code),
/* 0xC is not defined */
#define NGX_QUIC_ERR_CRYPTO_BUFFER_EXCEEDED 0x0D
/* 0xE is not defined */
+/* 0xF is not defined */
#define NGX_QUIC_ERR_CRYPTO_ERROR 0x10
#define NGX_QUIC_ERR_LAST NGX_QUIC_ERR_CRYPTO_ERROR