aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/event/ngx_event_quic_transport.c32
-rw-r--r--src/event/ngx_event_quic_transport.h2
2 files changed, 22 insertions, 12 deletions
diff --git a/src/event/ngx_event_quic_transport.c b/src/event/ngx_event_quic_transport.c
index 0eee5052f..23921a04d 100644
--- a/src/event/ngx_event_quic_transport.c
+++ b/src/event/ngx_event_quic_transport.c
@@ -622,6 +622,7 @@ ngx_quic_parse_frame(ngx_quic_header_t *pkt, u_char *start, u_char *end,
break;
case NGX_QUIC_FT_CONNECTION_CLOSE:
+ case NGX_QUIC_FT_CONNECTION_CLOSE2:
p = ngx_quic_parse_int_multi(p, end, &f->u.close.error_code,
&f->u.close.frame_type,
@@ -640,18 +641,27 @@ ngx_quic_parse_frame(ngx_quic_header_t *pkt, u_char *start, u_char *end,
return NGX_ERROR;
}
- if (f->u.close.error_code >= NGX_QUIC_ERR_LAST) {
- ngx_log_error(NGX_LOG_ERR, pkt->log, 0,
- "unkown error code: %ui, truncated",
- f->u.close.error_code);
- f->u.close.error_code = NGX_QUIC_ERR_LAST - 1;
- }
+ if (f->type == NGX_QUIC_FT_CONNECTION_CLOSE) {
- 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),
- f->u.close.error_code, f->u.close.frame_type,
- &f->u.close.reason);
+ if (f->u.close.error_code >= NGX_QUIC_ERR_LAST) {
+ ngx_log_error(NGX_LOG_ERR, 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),
+ f->u.close.error_code, f->u.close.frame_type,
+ &f->u.close.reason);
+ } else {
+
+ ngx_log_debug3(NGX_LOG_DEBUG_EVENT, pkt->log, 0,
+ "CONN.CLOSE2: { (0x%xi) type=0x%xi reason '%V'}",
+ f->u.close.error_code, f->u.close.frame_type,
+ &f->u.close.reason);
+ }
break;
diff --git a/src/event/ngx_event_quic_transport.h b/src/event/ngx_event_quic_transport.h
index 9fd6ac16b..39a11040f 100644
--- a/src/event/ngx_event_quic_transport.h
+++ b/src/event/ngx_event_quic_transport.h
@@ -47,7 +47,7 @@
#define NGX_QUIC_FT_PATH_CHALLENGE 0x1A
#define NGX_QUIC_FT_PATH_RESPONSE 0x1B
#define NGX_QUIC_FT_CONNECTION_CLOSE 0x1C
-#define NGX_QUIC_FT_CONNECTION_CLOSE2 0x1D // XXX
+#define NGX_QUIC_FT_CONNECTION_CLOSE2 0x1D
#define NGX_QUIC_FT_HANDSHAKE_DONE 0x1E
/* 22.4. QUIC Transport Error Codes Registry */