mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-29 09:41:21 +02:00
BUG/MINOR: quic: Too big PTO during handshakes
During the handshake and when the handshake has not been confirmed the acknowledgement delays reported by the peer may be larger than max_ack_delay. max_ack_delay SHOULD be ignored before the handshake is completed when computing the PTO. But the current code considered the wrong condition "before the hanshake is completed". Replace the enum value QUIC_HS_ST_COMPLETED by QUIC_HS_ST_CONFIRMED to fix this issue. In quic_loss.c, the parameter passed to quic_pto_pktns() is renamed to avoid any possible confusion. Must be backported to 2.7 and 2.6.
This commit is contained in:
parent
dd419461ef
commit
b75eecc874
@ -734,7 +734,7 @@ static inline void qc_set_timer(struct quic_conn *qc)
|
||||
{
|
||||
struct quic_pktns *pktns;
|
||||
unsigned int pto;
|
||||
int handshake_complete;
|
||||
int handshake_confirmed;
|
||||
|
||||
TRACE_ENTER(QUIC_EV_CONN_STIMER, qc,
|
||||
NULL, NULL, &qc->path->ifae_pkts);
|
||||
@ -762,8 +762,8 @@ static inline void qc_set_timer(struct quic_conn *qc)
|
||||
goto out;
|
||||
}
|
||||
|
||||
handshake_complete = qc->state >= QUIC_HS_ST_COMPLETE;
|
||||
pktns = quic_pto_pktns(qc, handshake_complete, &pto);
|
||||
handshake_confirmed = qc->state >= QUIC_HS_ST_CONFIRMED;
|
||||
pktns = quic_pto_pktns(qc, handshake_confirmed, &pto);
|
||||
if (tick_isset(pto))
|
||||
qc->timer = pto;
|
||||
out:
|
||||
@ -4650,7 +4650,7 @@ struct task *qc_process_timer(struct task *task, void *ctx, unsigned int state)
|
||||
}
|
||||
|
||||
if (qc->path->in_flight) {
|
||||
pktns = quic_pto_pktns(qc, qc->state >= QUIC_HS_ST_COMPLETE, NULL);
|
||||
pktns = quic_pto_pktns(qc, qc->state >= QUIC_HS_ST_CONFIRMED, NULL);
|
||||
if (qc->subs && qc->subs->events & SUB_RETRY_SEND) {
|
||||
pktns->tx.pto_probe = QUIC_MAX_NB_PTO_DGRAMS;
|
||||
tasklet_wakeup(qc->subs->tasklet);
|
||||
|
@ -80,7 +80,7 @@ struct quic_pktns *quic_loss_pktns(struct quic_conn *qc)
|
||||
* as PTO value if not.
|
||||
*/
|
||||
struct quic_pktns *quic_pto_pktns(struct quic_conn *qc,
|
||||
int handshake_completed,
|
||||
int handshake_confirmed,
|
||||
unsigned int *pto)
|
||||
{
|
||||
int i;
|
||||
@ -117,7 +117,7 @@ struct quic_pktns *quic_pto_pktns(struct quic_conn *qc,
|
||||
continue;
|
||||
|
||||
if (i == QUIC_TLS_PKTNS_01RTT) {
|
||||
if (!handshake_completed) {
|
||||
if (!handshake_confirmed) {
|
||||
TRACE_STATE("handshake not already completed", QUIC_EV_CONN_SPTO, qc);
|
||||
pktns = p;
|
||||
goto out;
|
||||
|
Loading…
x
Reference in New Issue
Block a user