]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: vars: make the var() sample fetch keyword depend on nothing
authorWilly Tarreau <w@1wt.eu>
Fri, 26 Mar 2021 11:08:06 +0000 (12:08 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 26 Mar 2021 15:23:45 +0000 (16:23 +0100)
This sample fetch doesn't require any L4 client session in practice, as
get_var() now checks for the session. This is important to remove this
dependency in order to support accessing variables in scope "proc" from
anywhere.

src/vars.c

index 3c19ec815eead3a39bc3560d4af634112f1afe49..e71d7f1c0abf1ff2f34d91c0d20a14d7aaeb44fe 100644 (file)
@@ -864,7 +864,7 @@ REGISTER_POST_DEINIT(vars_deinit);
 
 static struct sample_fetch_kw_list sample_fetch_keywords = {ILH, {
 
-       { "var", smp_fetch_var, ARG1(1,STR), smp_check_var, SMP_T_STR, SMP_USE_L4CLI },
+       { "var", smp_fetch_var, ARG1(1,STR), smp_check_var, SMP_T_STR, SMP_USE_INTRN },
        { /* END */ },
 }};