From: Willy Tarreau Date: Tue, 30 Jul 2024 15:54:26 +0000 (+0200) Subject: BUG/MINOR: stconn: bs.id and fs.id had their dependencies incorrect X-Git-Tag: v3.1-dev5~64 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=376b147ffffef0a1f898d72d1d70f10f07d2e5a4;p=thirdparty%2Fhaproxy.git 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 --- diff --git a/src/stconn.c b/src/stconn.c index 8f9f264b9d..cabc23a7ad 100644 --- a/src/stconn.c +++ b/src/stconn.c @@ -2459,10 +2459,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 */ },