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.
This commit is contained in:
Amaury Denoyelle 2022-05-31 15:17:02 +02:00
parent fdc1b96357
commit 9f17a5aa8a

View 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) {