]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: stconn: bs.id and fs.id had their dependencies incorrect
authorWilly Tarreau <w@1wt.eu>
Tue, 30 Jul 2024 15:54:26 +0000 (17:54 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 30 Jul 2024 16:39:29 +0000 (18:39 +0200)
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 <w@1wt.eu>
src/stconn.c

index 8f9f264b9d90eefcde8e36abe65b9e243c95a5ae..cabc23a7ad3078bf297231e59a4509c5691f26db 100644 (file)
@@ -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 */ },