When called on a frontend connection, the 'sess_el' list that is checked
in '__trace_enabled' was never initialized (see 'conn_backend_init' and
'conn_frontend_init').
This patch can be backported to all stable branches.
#endif
if (!ctx.sess && ctx.strm)
ctx.sess = ctx.strm->sess;
- else if (!ctx.sess && ctx.conn && LIST_INLIST(&ctx.conn->sess_el))
+ else if (!ctx.sess && ctx.conn && conn_is_back(ctx.conn) && LIST_INLIST(&ctx.conn->sess_el))
ctx.sess = ctx.conn->owner;
else if (!ctx.sess && ctx.check)
ctx.sess = ctx.check->sess;