From ab921e193529c368afdbda979dab2ca025485edf Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 6 Aug 2024 11:07:13 +0200 Subject: [PATCH] BUG/MINOR: trace/quic: enable conn/session pointer recovery from quic_conn In __trace_enabled(), a quic_conn was detected, but it was not possible to derive the connection nor the session from it, which was quite limiting in terms of ability to track a same instance. This should be backported to at least 3.0, maybe even 2.6. (cherry picked from commit aa1915a9f559724cb3fc2be39a2d928d99556e5a) Signed-off-by: Christopher Faulet --- src/trace.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/trace.c b/src/trace.c index fcf557bb7..bed9d799b 100644 --- a/src/trace.c +++ b/src/trace.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -127,6 +128,10 @@ int __trace_enabled(enum trace_level level, uint64_t mask, struct trace_source * if (src->arg_def & TRC_ARGS_APPCTX) appctx = trace_pick_arg(src->arg_def & TRC_ARGS_APPCTX, a1, a2, a3, a4); +#ifdef USE_QUIC + if (qc && !conn) + conn = qc->conn; +#endif if (!sess && strm) sess = strm->sess; else if (!sess && conn && LIST_INLIST(&conn->sess_el))