]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: cfgparse-global: parse *env keywords in MODE_DISCOVERY
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Sat, 12 Oct 2024 12:45:36 +0000 (14:45 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 16 Oct 2024 20:02:39 +0000 (22:02 +0200)
setenv/resetenv/presetenv/unsetenv keywords should be parsed by master
process and by worker. As some other master parameters could be enabled in
conditional blocks (.if...endif). To achieve this let's tag '*env' keywords
with KWF_DISCOVERY flag.

src/cfgparse-global.c

index a17bf001a58e32f815654b720f4d747e1a0a5114..daca46ac84d646b0ce556f8c5924ac997b4ffe41 100644 (file)
@@ -1577,10 +1577,10 @@ static struct cfg_kw_list cfg_kws = {ILH, {
        { CFG_GLOBAL, "tune.disable-zero-copy-forwarding", cfg_parse_global_tune_forward_opts },
        { CFG_GLOBAL, "tune.chksize", cfg_parse_global_unsupported_opts },
        { CFG_GLOBAL, "nbproc", cfg_parse_global_unsupported_opts },
-       { CFG_GLOBAL, "setenv", cfg_parse_global_env_opts },
-       { CFG_GLOBAL, "unsetenv", cfg_parse_global_env_opts },
-       { CFG_GLOBAL, "resetenv", cfg_parse_global_env_opts },
-       { CFG_GLOBAL, "presetenv", cfg_parse_global_env_opts },
+       { CFG_GLOBAL, "setenv", cfg_parse_global_env_opts, KWF_DISCOVERY },
+       { CFG_GLOBAL, "unsetenv", cfg_parse_global_env_opts, KWF_DISCOVERY },
+       { CFG_GLOBAL, "resetenv", cfg_parse_global_env_opts, KWF_DISCOVERY },
+       { CFG_GLOBAL, "presetenv", cfg_parse_global_env_opts, KWF_DISCOVERY },
        { 0, NULL, NULL },
 }};