mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-20 04:30:46 +00:00
MINOR: quic: Add connection flags to traces
This should help in diagnosing issues. Some adjustments have to be done to avoid deferencing a quic_conn objects from TRACE_*() calls. Must be backported to 2.7 and 2.6.
This commit is contained in:
parent
809bd9fed1
commit
eb3e5171ed
@ -280,7 +280,7 @@ static void quic_trace(enum trace_level level, uint64_t mask, const struct trace
|
||||
if (qc) {
|
||||
const struct quic_tls_ctx *tls_ctx;
|
||||
|
||||
chunk_appendf(&trace_buf, " : qc@%p", qc);
|
||||
chunk_appendf(&trace_buf, " : qc@%p flags=0x%x", qc, qc->flags);
|
||||
if (mask & QUIC_EV_CONN_INIT) {
|
||||
chunk_appendf(&trace_buf, "\n odcid");
|
||||
quic_cid_dump(&trace_buf, &qc->odcid);
|
||||
@ -5673,6 +5673,7 @@ void quic_conn_release(struct quic_conn *qc)
|
||||
|
||||
pool_free(pool_head_quic_conn_rxbuf, qc->rx.buf.area);
|
||||
pool_free(pool_head_quic_conn, qc);
|
||||
qc = NULL;
|
||||
|
||||
TRACE_PROTO("QUIC conn. freed", QUIC_EV_CONN_FREED, qc);
|
||||
|
||||
|
@ -31,6 +31,7 @@ static void quic_close(struct connection *conn, void *xprt_ctx)
|
||||
/* If the quic-conn timer has already expired free the quic-conn. */
|
||||
if (qc->flags & QUIC_FL_CONN_EXP_TIMER) {
|
||||
quic_conn_release(qc);
|
||||
qc = NULL;
|
||||
goto leave;
|
||||
}
|
||||
|
||||
@ -108,7 +109,7 @@ static int qc_conn_init(struct connection *conn, void **xprt_ctx)
|
||||
{
|
||||
struct quic_conn *qc = NULL;
|
||||
|
||||
TRACE_ENTER(QUIC_EV_CONN_NEW, conn);
|
||||
TRACE_ENTER(QUIC_EV_CONN_NEW, qc);
|
||||
|
||||
/* do not store the context if already set */
|
||||
if (*xprt_ctx)
|
||||
|
Loading…
Reference in New Issue
Block a user