]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: quic: Useless probing retransmission in draining or killing state
authorFrédéric Lécaille <flecaille@haproxy.com>
Mon, 24 Apr 2023 09:26:06 +0000 (11:26 +0200)
committerFrédéric Lécaille <flecaille@haproxy.com>
Mon, 24 Apr 2023 09:46:33 +0000 (11:46 +0200)
The timer task responsible of triggering probing retransmission did not inspect
the state of the connection before doing its job. But there is no need to
probe the peer when the connection is in draining or killing state. About the
draining state, this is even forbidden.

Must be backported to 2.7 and 2.6.

src/quic_conn.c

index 007afee587855696c414e163ae4458ded106366b..43737ec0a480d27a50654935b6be0c9d60c2fa4f 100644 (file)
@@ -5352,8 +5352,16 @@ struct task *qc_process_timer(struct task *task, void *ctx, unsigned int state)
        TRACE_ENTER(QUIC_EV_CONN_PTIMER, qc);
        TRACE_PROTO("process timer", QUIC_EV_CONN_PTIMER, qc,
                    NULL, NULL, &qc->path->ifae_pkts);
+
        task->expire = TICK_ETERNITY;
        pktns = quic_loss_pktns(qc);
+
+       if (qc->flags & (QUIC_FL_CONN_DRAINING|QUIC_FL_CONN_TO_KILL)) {
+               TRACE_PROTO("cancelled action (draining state)", QUIC_EV_CONN_PTIMER, qc);
+               task = NULL;
+               goto out;
+       }
+
        if (tick_isset(pktns->tx.loss_time)) {
                struct list lost_pkts = LIST_HEAD_INIT(lost_pkts);