Mercurial > hg > nginx-quic
comparison src/event/ngx_event_quic.c @ 8073:eb5aa85294e9 quic
QUIC: discard unrecognized long packes.
While there, updated comment about discarded packets.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Wed, 02 Sep 2020 09:54:15 +0300 |
parents | 62b58f0a4711 |
children | c6b963de0c00 |
comparison
equal
deleted
inserted
replaced
8072:985f9351dd87 | 8073:eb5aa85294e9 |
---|---|
1591 rc = ngx_quic_early_input(c, &pkt); | 1591 rc = ngx_quic_early_input(c, &pkt); |
1592 | 1592 |
1593 } else { | 1593 } else { |
1594 ngx_log_error(NGX_LOG_INFO, c->log, 0, | 1594 ngx_log_error(NGX_LOG_INFO, c->log, 0, |
1595 "quic unknown long packet type"); | 1595 "quic unknown long packet type"); |
1596 return NGX_ERROR; | 1596 rc = NGX_DECLINED; |
1597 } | 1597 } |
1598 | 1598 |
1599 } else { | 1599 } else { |
1600 rc = ngx_quic_app_input(c, &pkt); | 1600 rc = ngx_quic_app_input(c, &pkt); |
1601 } | 1601 } |
1616 * | 1616 * |
1617 * For example, if decryption fails (because the keys are | 1617 * For example, if decryption fails (because the keys are |
1618 * not available or any other reason), the receiver MAY either | 1618 * not available or any other reason), the receiver MAY either |
1619 * discard or buffer the packet for later processing and MUST | 1619 * discard or buffer the packet for later processing and MUST |
1620 * attempt to process the remaining packets. | 1620 * attempt to process the remaining packets. |
1621 * | |
1622 * We also skip packets that don't match connection state | |
1623 * or cannot be parsed properly. | |
1621 */ | 1624 */ |
1622 | 1625 |
1623 /* b->pos is at header end, adjust by actual packet length */ | 1626 /* b->pos is at header end, adjust by actual packet length */ |
1624 b->pos += pkt.len; | 1627 b->pos += pkt.len; |
1625 p = ngx_quic_skip_zero_padding(b); | 1628 p = ngx_quic_skip_zero_padding(b); |