From 2899fe2460ec38dee2606bef18f6a3ed29ba60e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Mon, 21 Mar 2022 10:43:53 +0100 Subject: [PATCH] BUG/MINOR: quic: Missing TX packet initializations 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 | 2 +- src/xprt_quic.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/haproxy/xprt_quic-t.h b/include/haproxy/xprt_quic-t.h index e9ad9113b..fd6486c26 100644 --- a/include/haproxy/xprt_quic-t.h +++ b/include/haproxy/xprt_quic-t.h @@ -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; diff --git a/src/xprt_quic.c b/src/xprt_quic.c index b50af85b3..3e4dd9290 100644 --- a/src/xprt_quic.c +++ b/src/xprt_quic.c @@ -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; }