From: Amaury Denoyelle Date: Thu, 10 Mar 2022 15:46:18 +0000 (+0100) Subject: MINOR: mux-quic: prevent push frame for unidir streams X-Git-Tag: v2.6-dev3~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e2ec9421ea769cc5673b664300720ddbb2c0c9ac;p=thirdparty%2Fhaproxy.git MINOR: mux-quic: prevent push frame for unidir streams For the moment, unidirectional streams handling is not identical to bidirectional ones in MUX/H3 layer, both in Rx and Tx path. As a safety, skip over uni streams in qc_send. In fact, this change has no impact because qcs.tx.buf is emptied before we start using qcs_push_frame, which prevents the call to qcs_push_frame. However, this condition will soon change to improve bidir streams emission, so an explicit check on stream type must be done. It is planified to unify uni and bidir streams handling in a future stage. When implemented, the check will be removed. --- diff --git a/src/mux_quic.c b/src/mux_quic.c index e3ad4eb9c0..988d384583 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -450,6 +450,16 @@ static int qc_send(struct qcc *qcc) struct qcs *qcs = container_of(node, struct qcs, by_id); struct buffer *buf = &qcs->tx.buf; + /* TODO + * for the moment, unidirectional streams have their own + * mechanism for sending. This should be unified in the future, + * in this case the next check will be removed. + */ + if (quic_stream_is_uni(qcs->by_id.key)) { + node = eb64_next(node); + continue; + } + if (b_data(buf)) { char fin = qcs->flags & QC_SF_FIN_STREAM; ret = qcs_push_frame(qcs, buf, fin, qcs->tx.offset,