mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 07:37:02 +02:00
BUG/MAJOR: mux-quic: properly fix BUG_ON on empty STREAM emission
Properly fix BUG_ON() occurence when QUIC MUX emits only empty STREAM frames. This was addressed by a previous patch but it causes another regression so a revert was needed. BUG_ON() on qcc_build_frms() return value is invalid. Indeed, qcc_build_frms() may return 0, but this does not imply that frame list is empty, as encoded frames can have a zero length payload. As such, simply remove this invalid BUG_ON(). This must be backported up to 3.1.
This commit is contained in:
parent
85e27f1e92
commit
ddfd8031f8
@ -2389,7 +2389,9 @@ static int qcc_emit_rs_ss(struct qcc *qcc)
|
|||||||
* error occured during this step, this is considered as fatal. Tx frms is
|
* error occured during this step, this is considered as fatal. Tx frms is
|
||||||
* cleared and 0 is returned.
|
* cleared and 0 is returned.
|
||||||
*
|
*
|
||||||
* Returns the sum of encoded STREAM frames length or 0 if no frame built.
|
* Returns the sum of encoded payload STREAM frames length. Note that 0 can be
|
||||||
|
* returned either if no frame was built or only empty payload frames were
|
||||||
|
* encoded.
|
||||||
*/
|
*/
|
||||||
static int qcc_build_frms(struct qcc *qcc, struct list *qcs_failed)
|
static int qcc_build_frms(struct qcc *qcc, struct list *qcs_failed)
|
||||||
{
|
{
|
||||||
@ -2505,11 +2507,9 @@ static int qcc_io_send(struct qcc *qcc)
|
|||||||
/* Encode new STREAM frames if list has been previously cleared. */
|
/* Encode new STREAM frames if list has been previously cleared. */
|
||||||
if (LIST_ISEMPTY(frms) && !LIST_ISEMPTY(&qcc->send_list)) {
|
if (LIST_ISEMPTY(frms) && !LIST_ISEMPTY(&qcc->send_list)) {
|
||||||
total = qcc_build_frms(qcc, &qcs_failed);
|
total = qcc_build_frms(qcc, &qcs_failed);
|
||||||
if (!total) {
|
if (LIST_ISEMPTY(frms))
|
||||||
BUG_ON(!LIST_ISEMPTY(frms));
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (qcc_is_pacing_active(qcc->conn)) {
|
if (qcc_is_pacing_active(qcc->conn)) {
|
||||||
if (!LIST_ISEMPTY(frms) && !quic_pacing_expired(&qcc->tx.pacer)) {
|
if (!LIST_ISEMPTY(frms) && !quic_pacing_expired(&qcc->tx.pacer)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user