summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/event/ngx_event_quic_transport.c17
-rw-r--r--src/event/ngx_event_quic_transport.h1
2 files changed, 9 insertions, 9 deletions
diff --git a/src/event/ngx_event_quic_transport.c b/src/event/ngx_event_quic_transport.c
index 5dc0f1d72..e291c1215 100644
--- a/src/event/ngx_event_quic_transport.c
+++ b/src/event/ngx_event_quic_transport.c
@@ -99,9 +99,10 @@ static char *ngx_quic_errors[] = {
"CONNECTION_ID_LIMIT_ERROR",
"PROTOCOL_VIOLATION",
"INVALID_TOKEN",
- "",
+ "unknown error 0xC",
"CRYPTO_BUFFER_EXCEEDED",
- "",
+ "unknown error 0xE",
+ "unknown error 0xF",
"CRYPTO_ERROR",
};
@@ -266,6 +267,11 @@ ngx_quic_build_int(u_char **pos, uint64_t value)
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];
}
@@ -777,13 +783,6 @@ ngx_quic_parse_frame(ngx_quic_header_t *pkt, u_char *start, u_char *end,
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),
diff --git a/src/event/ngx_event_quic_transport.h b/src/event/ngx_event_quic_transport.h
index 116ec2a85..2c3753e50 100644
--- a/src/event/ngx_event_quic_transport.h
+++ b/src/event/ngx_event_quic_transport.h
@@ -75,6 +75,7 @@
/* 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