]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: quic: Missing TX packet initializations
authorFrédéric Lécaille <flecaille@haproxy.com>
Mon, 21 Mar 2022 09:43:53 +0000 (10:43 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 21 Mar 2022 13:27:09 +0000 (14:27 +0100)
The most important one is the ->flags member which leads to an erratic xprt behavior.
For instance a non ack-eliciting packet could be seen as ack-eliciting leading the
xprt to try to retransmit a packet which are not ack-eliciting. In this case, the
xprt does nothing and remains indefinitively in a blocking state.

include/haproxy/xprt_quic-t.h
src/xprt_quic.c

index e9ad9113bd44b355d04c45319e117b1c1ccace38..fd6486c261072507bb69423297b3c29582e6d3b0 100644 (file)
@@ -524,7 +524,7 @@ struct quic_tx_packet {
        struct eb64_node pn_node;
        /* The list of frames of this packet. */
        struct list frms;
-       /* The time this packet was sent (usec). */
+       /* The time this packet was sent (ms). */
        unsigned int time_sent;
        /* Packet number spakce. */
        struct quic_pktns *pktns;
index b50af85b375d5fb755cd1b14830a246bbf0b0385..3e4dd9290cabd5b19759b53fa53822ce3ffb1ef2 100644 (file)
@@ -5299,8 +5299,10 @@ static inline void quic_tx_packet_init(struct quic_tx_packet *pkt, int type)
        pkt->in_flight_len = 0;
        pkt->pn_node.key = (uint64_t)-1;
        LIST_INIT(&pkt->frms);
+       pkt->time_sent = TICK_ETERNITY;
        pkt->next = NULL;
        pkt->largest_acked_pn = -1;
+       pkt->flags = 0;
        pkt->refcnt = 0;
 }