comparison src/event/quic/ngx_event_quic_transport.c @ 8417:dcc57827098d quic

QUIC: fixed parsing of unknown frame types. The ngx_quic_frame_allowed() function only expects known frame types.
author Vladimir Homutov <vl@nginx.com>
date Mon, 19 Apr 2021 11:36:41 +0300
parents b4e6b7049984
children 17492dfd4744
comparison
equal deleted inserted replaced
8416:e29b7508b8b3 8417:dcc57827098d
737 p = ngx_quic_parse_int(p, end, &varint); 737 p = ngx_quic_parse_int(p, end, &varint);
738 if (p == NULL) { 738 if (p == NULL) {
739 pkt->error = NGX_QUIC_ERR_FRAME_ENCODING_ERROR; 739 pkt->error = NGX_QUIC_ERR_FRAME_ENCODING_ERROR;
740 ngx_log_error(NGX_LOG_INFO, pkt->log, 0, 740 ngx_log_error(NGX_LOG_INFO, pkt->log, 0,
741 "quic failed to obtain quic frame type"); 741 "quic failed to obtain quic frame type");
742 return NGX_ERROR;
743 }
744
745 if (varint > NGX_QUIC_FT_LAST) {
746 pkt->error = NGX_QUIC_ERR_FRAME_ENCODING_ERROR;
747 ngx_log_error(NGX_LOG_INFO, pkt->log, 0,
748 "quic unknown frame type 0x%xL", varint);
742 return NGX_ERROR; 749 return NGX_ERROR;
743 } 750 }
744 751
745 f->type = varint; 752 f->type = varint;
746 753