struct buffer buf;
struct list pkt_list;
- /* first unhandled streams ID, set by MUX after release */
+ /* first unhandled stream IDs, set by MUX on release and then updated by quic-conn */
uint64_t stream_max_uni;
uint64_t stream_max_bidi;
/* first stream IDs, which cannot be opened by the peer due to flow-control, set by MUX after release */
{
struct qf_stream *strm_frm = &frm->stream;
const char fin = frm->type & QUIC_STREAM_FRAME_TYPE_FIN_BIT;
- uint64_t max, lim;
+ uint64_t *max, lim;
/* The upper layer may not be allocated. */
if (!qc_is_conn_ready(qc)) {
}
if (quic_stream_is_uni(strm_frm->id)) {
- lim = qc->rx.stream_lim_uni;
- max = qc->rx.stream_max_uni;
+ lim = qc->rx.stream_lim_uni;
+ max = &qc->rx.stream_max_uni;
}
else {
- lim = qc->rx.stream_lim_bidi;
- max = qc->rx.stream_max_bidi;
+ lim = qc->rx.stream_lim_bidi;
+ max = &qc->rx.stream_max_bidi;
}
- if (strm_frm->id < max) {
+ if (strm_frm->id < *max) {
TRACE_DATA("Already closed stream", QUIC_EV_CONN_PRSHPKT, qc);
}
else {
}
TRACE_DEVEL("No mux for new stream", QUIC_EV_CONN_PRSHPKT, qc);
- if (qc->strm_reject) {
- if (!qc->strm_reject(&qc->ael->pktns->tx.frms, strm_frm->id)) {
+ if (!qc->strm_reject) {
+ /* This packet will not be acknowledged */
+ goto err;
+ }
+
+ for (; *max <= strm_frm->id; *max += 4) {
+ if (!qc->strm_reject(&qc->ael->pktns->tx.frms, *max)) {
TRACE_ERROR("error on request rejection", QUIC_EV_CONN_PRSHPKT, qc);
/* This packet will not be acknowledged */
goto err;
}
}
- else {
- /* This packet will not be acknowledged */
- goto err;
- }
}
break;