mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-18 09:21:01 +01:00
BUG/MINOR: quic: close connection on CID alloc failure
During RETIRE_CONNECTION_ID frame parsing, a new connection ID is immediately reallocated after the release of the previous one. This is done to ensure that the peer will never run out of DCID. Prior to this patch, a CID allocation failure was be silently ignored. This prevent the emission of a new CID, which could prevent the peer to emit packets if it had no other CIDs available for use. Now, such error is considered fatal to the connection. This is the safest solution as it's better to close connections when memory is running low. It must be backported up to 2.8.
This commit is contained in:
parent
137d5ba93f
commit
73621adb23
@ -1020,6 +1020,9 @@ static int qc_parse_pkt_frms(struct quic_conn *qc, struct quic_rx_packet *pkt,
|
||||
conn_id = new_quic_cid(qc->cids, qc, NULL, NULL);
|
||||
if (!conn_id) {
|
||||
TRACE_ERROR("CID allocation error", QUIC_EV_CONN_IO_CB, qc);
|
||||
quic_set_connection_close(qc, quic_err_transport(QC_ERR_INTERNAL_ERROR));
|
||||
qc_notify_err(qc);
|
||||
goto err;
|
||||
}
|
||||
else {
|
||||
_quic_cid_insert(conn_id);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user