mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 07:37:02 +02:00
BUG/MINOR: quic: Ensure not to retransmit packets with no ack-eliciting frames
Even if there is a check in callers of qc_prep_hdshk_fast_retrans() and qc_prep_fast_retrans() to prevent retransmissions of packets with no ack-eliciting frames, these two functions should pay attention not do to that especially if someone decides to modify their implementations in the future. Must be backported to 2.6 and 2.7.
This commit is contained in:
parent
b3562a3815
commit
21564be4a2
@ -2616,15 +2616,19 @@ static void qc_prep_fast_retrans(struct quic_conn *qc,
|
||||
node = eb64_first(pkts);
|
||||
start:
|
||||
while (node) {
|
||||
pkt = eb64_entry(node, struct quic_tx_packet, pn_node);
|
||||
struct quic_tx_packet *p;
|
||||
|
||||
p = eb64_entry(node, struct quic_tx_packet, pn_node);
|
||||
node = eb64_next(node);
|
||||
/* Skip the empty and coalesced packets */
|
||||
TRACE_PRINTF(TRACE_LEVEL_DEVELOPER, QUIC_EV_CONN_SPPKTS, qc, 0, 0, 0,
|
||||
"--> pn=%llu (%d %d)", (ull)pkt->pn_node.key,
|
||||
LIST_ISEMPTY(&pkt->frms), !!(pkt->flags & QUIC_FL_TX_PACKET_COALESCED));
|
||||
if (!LIST_ISEMPTY(&pkt->frms))
|
||||
"--> pn=%llu (%d %d)", (ull)p->pn_node.key,
|
||||
LIST_ISEMPTY(&p->frms), !!(p->flags & QUIC_FL_TX_PACKET_COALESCED));
|
||||
if (!LIST_ISEMPTY(&p->frms)) {
|
||||
pkt = p;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!pkt)
|
||||
goto leave;
|
||||
@ -2674,12 +2678,17 @@ static void qc_prep_hdshk_fast_retrans(struct quic_conn *qc,
|
||||
node = eb64_first(pkts);
|
||||
/* Skip the empty packet (they have already been retransmitted) */
|
||||
while (node) {
|
||||
pkt = eb64_entry(node, struct quic_tx_packet, pn_node);
|
||||
struct quic_tx_packet *p;
|
||||
|
||||
p = eb64_entry(node, struct quic_tx_packet, pn_node);
|
||||
TRACE_PRINTF(TRACE_LEVEL_DEVELOPER, QUIC_EV_CONN_SPPKTS, qc, 0, 0, 0,
|
||||
"--> pn=%llu (%d %d)", (ull)pkt->pn_node.key,
|
||||
LIST_ISEMPTY(&pkt->frms), !!(pkt->flags & QUIC_FL_TX_PACKET_COALESCED));
|
||||
if (!LIST_ISEMPTY(&pkt->frms) && !(pkt->flags & QUIC_FL_TX_PACKET_COALESCED))
|
||||
"--> pn=%llu (%d %d)", (ull)p->pn_node.key,
|
||||
LIST_ISEMPTY(&p->frms), !!(p->flags & QUIC_FL_TX_PACKET_COALESCED));
|
||||
if (!LIST_ISEMPTY(&p->frms) && !(p->flags & QUIC_FL_TX_PACKET_COALESCED)) {
|
||||
pkt = p;
|
||||
break;
|
||||
}
|
||||
|
||||
node = eb64_next(node);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user