mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-25 15:51:24 +02:00
BUG/MINOR: quic: Missing TX packet deallocations
Ensure all TX packets are deallocated. There may be remaining ones which will never be acknowledged or deemed lost.
This commit is contained in:
parent
64670884ba
commit
eb2a2da67c
@ -1018,27 +1018,10 @@ static inline void quic_tx_packet_refdec(struct quic_tx_packet *pkt)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Discard <pktns> packet number space attached to <qc> QUIC connection.
|
static inline void quic_pktns_tx_pkts_release(struct quic_pktns *pktns)
|
||||||
* Its loss information are reset. Deduce the outstanding bytes for this
|
|
||||||
* packet number space from the outstanding bytes for the path of this
|
|
||||||
* connection.
|
|
||||||
* Note that all the non acknowledged TX packets and their frames are freed.
|
|
||||||
* Always succeeds.
|
|
||||||
*/
|
|
||||||
static inline void quic_pktns_discard(struct quic_pktns *pktns,
|
|
||||||
struct quic_conn *qc)
|
|
||||||
{
|
{
|
||||||
struct eb64_node *node;
|
struct eb64_node *node;
|
||||||
|
|
||||||
qc->path->in_flight -= pktns->tx.in_flight;
|
|
||||||
qc->path->prep_in_flight -= pktns->tx.in_flight;
|
|
||||||
qc->path->loss.pto_count = 0;
|
|
||||||
|
|
||||||
pktns->tx.time_of_last_eliciting = 0;
|
|
||||||
pktns->tx.loss_time = TICK_ETERNITY;
|
|
||||||
pktns->tx.pto_probe = 0;
|
|
||||||
pktns->tx.in_flight = 0;
|
|
||||||
|
|
||||||
node = eb64_first(&pktns->tx.pkts);
|
node = eb64_first(&pktns->tx.pkts);
|
||||||
while (node) {
|
while (node) {
|
||||||
struct quic_tx_packet *pkt;
|
struct quic_tx_packet *pkt;
|
||||||
@ -1056,6 +1039,27 @@ static inline void quic_pktns_discard(struct quic_pktns *pktns,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Discard <pktns> packet number space attached to <qc> QUIC connection.
|
||||||
|
* Its loss information are reset. Deduce the outstanding bytes for this
|
||||||
|
* packet number space from the outstanding bytes for the path of this
|
||||||
|
* connection.
|
||||||
|
* Note that all the non acknowledged TX packets and their frames are freed.
|
||||||
|
* Always succeeds.
|
||||||
|
*/
|
||||||
|
static inline void quic_pktns_discard(struct quic_pktns *pktns,
|
||||||
|
struct quic_conn *qc)
|
||||||
|
{
|
||||||
|
qc->path->in_flight -= pktns->tx.in_flight;
|
||||||
|
qc->path->prep_in_flight -= pktns->tx.in_flight;
|
||||||
|
qc->path->loss.pto_count = 0;
|
||||||
|
|
||||||
|
pktns->tx.time_of_last_eliciting = 0;
|
||||||
|
pktns->tx.loss_time = TICK_ETERNITY;
|
||||||
|
pktns->tx.pto_probe = 0;
|
||||||
|
pktns->tx.in_flight = 0;
|
||||||
|
quic_pktns_tx_pkts_release(pktns);
|
||||||
|
}
|
||||||
|
|
||||||
/* Initialize <p> QUIC network path depending on <ipv4> boolean
|
/* Initialize <p> QUIC network path depending on <ipv4> boolean
|
||||||
* which is true for an IPv4 path, if not false for an IPv6 path.
|
* which is true for an IPv4 path, if not false for an IPv6 path.
|
||||||
*/
|
*/
|
||||||
|
@ -3802,8 +3802,10 @@ static void quic_conn_release(struct quic_conn *qc)
|
|||||||
pool_free(pool_head_quic_tls_secret, app_tls_ctx->rx.secret);
|
pool_free(pool_head_quic_tls_secret, app_tls_ctx->rx.secret);
|
||||||
pool_free(pool_head_quic_tls_secret, app_tls_ctx->tx.secret);
|
pool_free(pool_head_quic_tls_secret, app_tls_ctx->tx.secret);
|
||||||
|
|
||||||
for (i = 0; i < QUIC_TLS_PKTNS_MAX; i++)
|
for (i = 0; i < QUIC_TLS_PKTNS_MAX; i++) {
|
||||||
|
quic_pktns_tx_pkts_release(&qc->pktns[i]);
|
||||||
quic_free_arngs(&qc->pktns[i].rx.arngs);
|
quic_free_arngs(&qc->pktns[i].rx.arngs);
|
||||||
|
}
|
||||||
|
|
||||||
pool_free(pool_head_quic_conn_rxbuf, qc->rx.buf.area);
|
pool_free(pool_head_quic_conn_rxbuf, qc->rx.buf.area);
|
||||||
pool_free(pool_head_quic_conn, qc);
|
pool_free(pool_head_quic_conn, qc);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user