# HG changeset patch # User Vladimir Homutov # Date 1599029655 -10800 # Node ID eb5aa85294e9540521a58ebb9c91abffb6accb2d # Parent 985f9351dd871ee8ab336441c6b09e08bd1b017a QUIC: discard unrecognized long packes. While there, updated comment about discarded packets. diff --git a/src/event/ngx_event_quic.c b/src/event/ngx_event_quic.c --- 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_ } 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_ * 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 */