From 826f797bb06846aa6b8bf1a06ba3fb7e2828b9ff Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Wed, 23 Jul 2025 14:36:17 +0200 Subject: [PATCH] MINOR: mux-quic: disable glitch on backend side For now, QUIC glitch limit counter is only available on the frontend side. Thus, disable incrementation on the backend side for now. Also, session is only available as conn reliably on the frontend side, so session_add_glitch_ctr() operation is also securised. --- src/mux_quic.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/mux_quic.c b/src/mux_quic.c index 74faaa493..7222a9f4d 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -760,6 +760,10 @@ int _qcc_report_glitch(struct qcc *qcc, int inc) { const int max = global.tune.quic_frontend_glitches_threshold; + /* TODO add a BE limit for glitch counter */ + if (qcc->flags & QC_CF_IS_BACK) + return 0; + qcc->glitches += inc; if (max && qcc->glitches >= max && !(qcc->flags & QC_CF_ERRL) && (th_ctx->idle_pct <= global.tune.glitch_kill_maxidle)) { @@ -1333,7 +1337,7 @@ static int qcc_decode_qcs(struct qcc *qcc, struct qcs *qcs) if (!(qcs->flags & QC_SF_READ_ABORTED)) { ret = qcc->app_ops->rcv_buf(qcs, &b, fin); - if (qcc->glitches != prev_glitches) + if (qcc->glitches != prev_glitches && !(qcc->flags & QC_CF_IS_BACK)) session_add_glitch_ctr(qcc->conn->owner, qcc->glitches - prev_glitches); if (ret < 0) { @@ -2150,7 +2154,7 @@ int qcc_recv_reset_stream(struct qcc *qcc, uint64_t id, uint64_t err, uint64_t f } out: - if (qcc->glitches != prev_glitches) + if (qcc->glitches != prev_glitches && !(qcc->flags & QC_CF_IS_BACK)) session_add_glitch_ctr(qcc->conn->owner, qcc->glitches - prev_glitches); TRACE_LEAVE(QMUX_EV_QCC_RECV, qcc->conn); @@ -2256,7 +2260,7 @@ int qcc_recv_stop_sending(struct qcc *qcc, uint64_t id, uint64_t err) qcc_refresh_timeout(qcc); out: - if (qcc->glitches != prev_glitches) + if (qcc->glitches != prev_glitches && !(qcc->flags & QC_CF_IS_BACK)) session_add_glitch_ctr(qcc->conn->owner, qcc->glitches - prev_glitches); TRACE_LEAVE(QMUX_EV_QCC_RECV, qcc->conn);