From 01aeb7495f301a062d92e4b440f7ea9805f7467d Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 30 Jul 2024 17:54:26 +0200 Subject: [PATCH] BUG/MINOR: stconn: bs.id and fs.id had their dependencies incorrect The backend depends on the response and the frontend on the request, not the other way around. In addition, they used to depend on L6 (hence contents in the channel buffers) while they should only depend on L5 (permanent info known in the mux). This came in 2.9 with commit 24059615a7 ("MINOR: Add sample fetches to get the frontend and backend stream ID") so this can be backported there. (cherry picked from commit 61dd0156c82ea051779e6524cad403871c31fc5a) Signed-off-by: Willy Tarreau (cherry picked from commit 376b147ffffef0a1f898d72d1d70f10f07d2e5a4) Signed-off-by: Christopher Faulet --- src/stconn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stconn.c b/src/stconn.c index 536b1a6..bda1b61 100644 --- a/src/stconn.c +++ b/src/stconn.c @@ -2460,10 +2460,10 @@ smp_fetch_strm_rst_code(const struct arg *args, struct sample *smp, const char * * common denominator, the type that can be casted into all other ones. */ static struct sample_fetch_kw_list sample_fetch_keywords = {ILH, { - { "bs.id", smp_fetch_sid, 0, NULL, SMP_T_SINT, SMP_USE_L6REQ }, + { "bs.id", smp_fetch_sid, 0, NULL, SMP_T_SINT, SMP_USE_L5SRV }, { "bs.aborted", smp_fetch_strm_aborted, 0, NULL, SMP_T_SINT, SMP_USE_L5SRV }, { "bs.rst_code", smp_fetch_strm_rst_code, 0, NULL, SMP_T_SINT, SMP_USE_L5SRV }, - { "fs.id", smp_fetch_sid, 0, NULL, SMP_T_STR, SMP_USE_L6RES }, + { "fs.id", smp_fetch_sid, 0, NULL, SMP_T_STR, SMP_USE_L5CLI }, { "fs.aborted", smp_fetch_strm_aborted, 0, NULL, SMP_T_SINT, SMP_USE_L5CLI }, { "fs.rst_code", smp_fetch_strm_rst_code, 0, NULL, SMP_T_SINT, SMP_USE_L5CLI }, { /* END */ }, -- 1.7.10.4