]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: resolvers/mworker: missing default resolvers in mworker mode
authorWilliam Lallemand <wlallemand@haproxy.com>
Thu, 17 Oct 2024 10:17:23 +0000 (12:17 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Thu, 17 Oct 2024 10:17:23 +0000 (12:17 +0200)
Since commit fe75c1e12da061 ("MEDIUM: startup: remove
MODE_MWORKER_WAIT") the MODE_MWORKER_WAIT constant disappeared. The
initialization of the default resolvers section was conditionned by this
constant.

The section must be created in mworker mode, but only in the worker not in
the master. It was currently completely disabled in both the master and
the worker which could break configuration using it, as well as the
httpclient.

No backport needed.

src/resolvers.c

index 63d3791692f0df30a610cd1817a35ef4419a2b06..ed96c4eb5c23b807a2a18e0aedef82298544cb0c 100644 (file)
@@ -3841,7 +3841,8 @@ int resolvers_create_default()
 {
        int err_code = ERR_NONE;
 
-       if (global.mode & MODE_MWORKER) /* does not create the section if in MODE_MWORKER */
+       /* does not create the section if in master process */
+       if (master)
                return ERR_NONE;
 
        /* if the section already exists, do nothing */