aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVladimir Homutov <vl@nginx.com>2020-09-02 09:54:15 +0300
committerVladimir Homutov <vl@nginx.com>2020-09-02 09:54:15 +0300
commitff4cfa80e51a015d538a7880da5b5a41e1ac7289 (patch)
treed1e97c84bdda69634937f42d73994d1cf01a2548 /src
parente443b1244f60448805a873bf488a9d9f89bf7488 (diff)
downloadnginx-ff4cfa80e51a015d538a7880da5b5a41e1ac7289.tar.gz
nginx-ff4cfa80e51a015d538a7880da5b5a41e1ac7289.zip
QUIC: discard unrecognized long packes.
While there, updated comment about discarded packets.
Diffstat (limited to 'src')
-rw-r--r--src/event/ngx_event_quic.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/event/ngx_event_quic.c b/src/event/ngx_event_quic.c
index 913ffc56d..fbc6455a7 100644
--- a/src/event/ngx_event_quic.c
+++ b/src/event/ngx_event_quic.c
@@ -1593,7 +1593,7 @@ ngx_quic_input(ngx_connection_t *c, ngx_buf_t *b)
} else {
ngx_log_error(NGX_LOG_INFO, c->log, 0,
"quic unknown long packet type");
- return NGX_ERROR;
+ rc = NGX_DECLINED;
}
} else {
@@ -1618,6 +1618,9 @@ ngx_quic_input(ngx_connection_t *c, ngx_buf_t *b)
* not available or any other reason), the receiver MAY either
* discard or buffer the packet for later processing and MUST
* attempt to process the remaining packets.
+ *
+ * We also skip packets that don't match connection state
+ * or cannot be parsed properly.
*/
/* b->pos is at header end, adjust by actual packet length */