mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 07:37:02 +02:00
MINOR: quic: release the TLS context asap from quic_conn_release()
This was no reason not to release as soon as possible the TLS/SSL QUIC connection context from quic_conn_release() before allocating a "closing connection" connection (quic_cc_conn struct).
This commit is contained in:
parent
3a8dd48e30
commit
4cfae3ac01
@ -440,10 +440,6 @@ struct quic_conn_cntrs {
|
|||||||
/* Idle timer task */ \
|
/* Idle timer task */ \
|
||||||
struct task *idle_timer_task; \
|
struct task *idle_timer_task; \
|
||||||
unsigned int idle_expire; \
|
unsigned int idle_expire; \
|
||||||
struct ssl_sock_ctx *xprt_ctx; \
|
|
||||||
/* Used only to reach the tasklet for the I/O handler from this \
|
|
||||||
* quic_conn object. \
|
|
||||||
*/ \
|
|
||||||
/* QUIC connection level counters */ \
|
/* QUIC connection level counters */ \
|
||||||
struct quic_conn_cntrs cntrs; \
|
struct quic_conn_cntrs cntrs; \
|
||||||
struct connection *conn; \
|
struct connection *conn; \
|
||||||
@ -451,6 +447,10 @@ struct quic_conn_cntrs {
|
|||||||
|
|
||||||
struct quic_conn {
|
struct quic_conn {
|
||||||
QUIC_CONN_COMMON;
|
QUIC_CONN_COMMON;
|
||||||
|
/* Used only to reach the tasklet for the I/O handler from this
|
||||||
|
* quic_conn object.
|
||||||
|
*/
|
||||||
|
struct ssl_sock_ctx *xprt_ctx;
|
||||||
const struct quic_version *original_version;
|
const struct quic_version *original_version;
|
||||||
const struct quic_version *negotiated_version;
|
const struct quic_version *negotiated_version;
|
||||||
/* Negotiated version Initial TLS context */
|
/* Negotiated version Initial TLS context */
|
||||||
|
@ -770,7 +770,6 @@ static void quic_release_cc_conn(struct quic_cc_conn *cc_qc)
|
|||||||
pool_free(pool_head_quic_cc_buf, cc_qc->cc_buf_area);
|
pool_free(pool_head_quic_cc_buf, cc_qc->cc_buf_area);
|
||||||
cc_qc->cc_buf_area = NULL;
|
cc_qc->cc_buf_area = NULL;
|
||||||
/* free the SSL sock context */
|
/* free the SSL sock context */
|
||||||
qc_free_ssl_sock_ctx(&cc_qc->xprt_ctx);
|
|
||||||
pool_free(pool_head_quic_cc_conn, cc_qc);
|
pool_free(pool_head_quic_cc_conn, cc_qc);
|
||||||
|
|
||||||
TRACE_ENTER(QUIC_EV_CONN_IO_CB);
|
TRACE_ENTER(QUIC_EV_CONN_IO_CB);
|
||||||
@ -878,8 +877,6 @@ static struct quic_cc_conn *qc_new_cc_conn(struct quic_conn *qc)
|
|||||||
cc_qc->idle_timer_task->context = cc_qc;
|
cc_qc->idle_timer_task->context = cc_qc;
|
||||||
cc_qc->idle_expire = qc->idle_expire;
|
cc_qc->idle_expire = qc->idle_expire;
|
||||||
|
|
||||||
cc_qc->xprt_ctx = qc->xprt_ctx;
|
|
||||||
qc->xprt_ctx = NULL;
|
|
||||||
cc_qc->conn = qc->conn;
|
cc_qc->conn = qc->conn;
|
||||||
qc->conn = NULL;
|
qc->conn = NULL;
|
||||||
|
|
||||||
@ -1472,8 +1469,6 @@ void quic_conn_release(struct quic_conn *qc)
|
|||||||
qc->cids = NULL;
|
qc->cids = NULL;
|
||||||
pool_free(pool_head_quic_cc_buf, qc->tx.cc_buf_area);
|
pool_free(pool_head_quic_cc_buf, qc->tx.cc_buf_area);
|
||||||
qc->tx.cc_buf_area = NULL;
|
qc->tx.cc_buf_area = NULL;
|
||||||
/* free the SSL sock context */
|
|
||||||
qc_free_ssl_sock_ctx(&qc->xprt_ctx);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* in the unlikely (but possible) case the connection was just added to
|
/* in the unlikely (but possible) case the connection was just added to
|
||||||
@ -1496,6 +1491,8 @@ void quic_conn_release(struct quic_conn *qc)
|
|||||||
qc_stream_desc_free(stream, 1);
|
qc_stream_desc_free(stream, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* free the SSL sock context */
|
||||||
|
qc_free_ssl_sock_ctx(&qc->xprt_ctx);
|
||||||
/* Purge Rx packet list. */
|
/* Purge Rx packet list. */
|
||||||
list_for_each_entry_safe(pkt, pktback, &qc->rx.pkt_list, qc_rx_pkt_list) {
|
list_for_each_entry_safe(pkt, pktback, &qc->rx.pkt_list, qc_rx_pkt_list) {
|
||||||
LIST_DELETE(&pkt->qc_rx_pkt_list);
|
LIST_DELETE(&pkt->qc_rx_pkt_list);
|
||||||
|
Loading…
Reference in New Issue
Block a user