]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: xprt_qstrm: do not parse record length on read again
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 13 Apr 2026 06:47:01 +0000 (08:47 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 13 Apr 2026 07:11:08 +0000 (09:11 +0200)
commitb8145fa5d4be12aa6f2f6d0367589e7bffa4ba55
tree12861935150f2d9f4acef36dfc919d47d7d55098
parentb5624a63650cae1f09a5ca1169602174b05b58aa
BUG/MINOR: xprt_qstrm: do not parse record length on read again

conn_recv_qstrm() may be called several times per connection if the read
data is too short and a truncated record is received.

Previously, record length was parsed every time the function is invoked.
However, this must only be performed if record length varint is
incomplete. Once read and parsed, data are removed from the buffer via
b_quic_dec_int(). Thus, next conn_recv_qstrm() run will reread an
invalid record length this time.

This patch fixes this by only parsing record length if <rxrlen> member
is null. Prior to it, parsing of QMux transport parameters would fail in
case of a first truncated read, which would prevent the connection
initialization.

No need to backport.
src/xprt_qstrm.c