]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: quic: Wrong initialization for io_cb_wakeup boolean
authorFrédéric Lécaille <flecaille@haproxy.com>
Wed, 15 Feb 2023 10:55:21 +0000 (11:55 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 17 Feb 2023 16:36:30 +0000 (17:36 +0100)
This bug arrives with this commit:
    982896961 MINOR: quic: split and rename qc_lstnr_pkt_rcv()
The first block of code consists in possibly setting this variable to true.
But it was already initialized to true before entering this code section.
Should be initialized to false.

Also take the opportunity to remove an unused "err" label.

Must be backported to 2.6 and 2.7.

src/quic_conn.c

index 51242437cc40bb45716a99fa376c777e6da3dad3..ebbf003cba10986944d1ac8be2298691ee9d3137 100644 (file)
@@ -6589,7 +6589,7 @@ static void qc_rx_pkt_handle(struct quic_conn *qc, struct quic_rx_packet *pkt,
        const struct quic_version *qv = pkt->version;
        struct quic_enc_level *qel = NULL;
        size_t b_cspace;
-       int io_cb_wakeup = 1;
+       int io_cb_wakeup = 0;
 
        TRACE_ENTER(QUIC_EV_CONN_LPKT, qc, pkt, NULL, qv);
 
@@ -6657,7 +6657,6 @@ static void qc_rx_pkt_handle(struct quic_conn *qc, struct quic_rx_packet *pkt,
 
  drop:
        HA_ATOMIC_INC(&qc->prx_counters->dropped_pkt);
- err:
        if (io_cb_wakeup) {
                TRACE_DEVEL("needs to wakeup the timer task after the amplification limit was reached",
                            QUIC_EV_CONN_LPKT, qc);