]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: quic: remove useless check on local UNI stream reception
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 31 May 2022 13:17:02 +0000 (15:17 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 31 May 2022 13:21:13 +0000 (15:21 +0200)
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.

src/xprt_quic.c

index f3a59346ca3fc633fa27f194eeaa4a5de3255328..d16fee548fc4e2668c48a2bb330d61ab101c73c7 100644 (file)
@@ -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) {