mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-09 00:32:33 -04:00
BUG/MINOR: mux_quic: do not interrupt recv on error/incomplete data
Some checks failed
Contrib / admin/halog/ (push) Has been cancelled
Contrib / dev/flags/ (push) Has been cancelled
Contrib / dev/haring/ (push) Has been cancelled
Contrib / dev/hpack/ (push) Has been cancelled
Contrib / dev/poll/ (push) Has been cancelled
VTest / Generate Build Matrix (push) Has been cancelled
Windows / Windows, gcc, all features (push) Has been cancelled
VTest / (push) Has been cancelled
Some checks failed
Contrib / admin/halog/ (push) Has been cancelled
Contrib / dev/flags/ (push) Has been cancelled
Contrib / dev/haring/ (push) Has been cancelled
Contrib / dev/hpack/ (push) Has been cancelled
Contrib / dev/poll/ (push) Has been cancelled
VTest / Generate Build Matrix (push) Has been cancelled
Windows / Windows, gcc, all features (push) Has been cancelled
VTest / (push) Has been cancelled
Prior to this patch, qcc_io_recv() stream decoding loop was interrupted on the first decoding error or if incomplete data could not be parsed. This patch adjusts this part so that loop is stopped only on a connection level error. In case of a stream level error or on incomplete data, decoding continues on the next QCS entry. Without this patch, there is a risk that a QCS decode is not performed as expected, with a possible client timeout firing. This is pretty unlikely though. However this patch is still necessary to remove completely this possibility. This should be backported up to 3.2.
This commit is contained in:
parent
a39b1a40ad
commit
07deafa104
1 changed files with 6 additions and 1 deletions
|
|
@ -3319,6 +3319,7 @@ static int qcc_io_recv(struct qcc *qcc)
|
|||
qcc_qmux_recv(qcc);
|
||||
}
|
||||
|
||||
next_recv:
|
||||
while (!LIST_ISEMPTY(&qcc->recv_list)) {
|
||||
qcs = LIST_ELEM(qcc->recv_list.n, struct qcs *, el_recv);
|
||||
/* No need to add an uni local stream in recv_list. */
|
||||
|
|
@ -3328,7 +3329,11 @@ static int qcc_io_recv(struct qcc *qcc)
|
|||
ret = qcc_decode_qcs(qcc, qcs);
|
||||
if (ret <= 0) {
|
||||
LIST_DEL_INIT(&qcs->el_recv);
|
||||
goto done;
|
||||
/* Interrupt all receive if connection on error. */
|
||||
if (qcc->flags & QC_CF_ERRL)
|
||||
goto done;
|
||||
/* Decode next entry if stream on error. */
|
||||
goto next_recv;
|
||||
}
|
||||
|
||||
total += ret;
|
||||
|
|
|
|||
Loading…
Reference in a new issue