From: Amaury Denoyelle Date: Tue, 31 May 2022 13:17:02 +0000 (+0200) Subject: CLEANUP: quic: remove useless check on local UNI stream reception X-Git-Tag: v2.6.0~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9f17a5aa8a411225d73be12c2a37c484e4c8fc91;p=thirdparty%2Fhaproxy.git CLEANUP: quic: remove useless check on local UNI stream reception The MUX now provides a single API for both uni and bidirectional streams. It is responsible to reject reception on a local unidirectional stream with the error STREAM_STATE_ERROR. This is already implemented in qcc_recv(). As such, remove this duplicated check from xprt_quic.c. --- diff --git a/src/xprt_quic.c b/src/xprt_quic.c index f3a59346ca..d16fee548f 100644 --- a/src/xprt_quic.c +++ b/src/xprt_quic.c @@ -2540,12 +2540,6 @@ static int qc_parse_pkt_frms(struct quic_rx_packet *pkt, struct ssl_sock_ctx *ct struct quic_stream *stream = &frm.stream; unsigned nb_streams = qc->rx.strms[qcs_id_type(stream->id)].nb_streams; - if (qc_is_listener(ctx->qc)) { - if (stream->id & QUIC_STREAM_FRAME_ID_INITIATOR_BIT) - goto err; - } else if (!(stream->id & QUIC_STREAM_FRAME_ID_INITIATOR_BIT)) - goto err; - /* The upper layer may not be allocated. */ if (qc->mux_state != QC_MUX_READY) { if ((stream->id >> QCS_ID_TYPE_SHIFT) < nb_streams) {