QUIC: discard unrecognized long packes.

While there, updated comment about discarded packets.
This commit is contained in:
Vladimir Homutov 2020-09-02 09:54:15 +03:00
parent e443b1244f
commit ff4cfa80e5

View File

@ -1593,7 +1593,7 @@ ngx_quic_input(ngx_connection_t *c, ngx_buf_t *b)
} else { } else {
ngx_log_error(NGX_LOG_INFO, c->log, 0, ngx_log_error(NGX_LOG_INFO, c->log, 0,
"quic unknown long packet type"); "quic unknown long packet type");
return NGX_ERROR; rc = NGX_DECLINED;
} }
} else { } 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 * not available or any other reason), the receiver MAY either
* discard or buffer the packet for later processing and MUST * discard or buffer the packet for later processing and MUST
* attempt to process the remaining packets. * 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 */ /* b->pos is at header end, adjust by actual packet length */