comparison src/event/ngx_event_quic_transport.c @ 8080:d3489d225f8f quic

QUIC: update packet length for short packets too. During long packet header parsing, pkt->len is updated with the Length field value that is used to find next coalesced packets in a datagram. For short packets it still contained the whole QUIC packet size. This change uniforms packet length handling to always contain the total length of the packet number and protected packet payload in pkt->len.
author Sergey Kandaurov <pluknet@nginx.com>
date Tue, 08 Sep 2020 13:27:39 +0300
parents 3afaaaa930ab
children 0f37b4ef3cd9
comparison
equal deleted inserted replaced
8079:dcbb58e7ed11 8080:d3489d225f8f
509 "quic packet is too small to read dcid"); 509 "quic packet is too small to read dcid");
510 return NGX_ERROR; 510 return NGX_ERROR;
511 } 511 }
512 512
513 pkt->raw->pos = p; 513 pkt->raw->pos = p;
514 pkt->len = end - p;
514 515
515 return NGX_OK; 516 return NGX_OK;
516 } 517 }
517 518
518 519