[BUGFIX] lsquic_gquic_be_parse_packet_in_finish() need to make sure the packet has flag PI_GQUIC.

Fix issue #262
This commit is contained in:
George Wang 2021-06-15 18:16:25 -04:00
parent ed94ac1253
commit b2e1404ca7

View file

@ -97,7 +97,7 @@ lsquic_gquic_be_parse_packet_in_finish (lsquic_packet_in_t *packet_in,
struct packin_parse_state *state)
{
lsquic_packno_t packno;
if (state->pps_nbytes)
if ((packet_in->pi_flags & PI_GQUIC) && state->pps_nbytes)
{
READ_UINT(packno, 64, state->pps_p, state->pps_nbytes);
packet_in->pi_packno = packno;