]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: config: No longer remove previous anonymous defaults section
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 13 Oct 2021 09:12:50 +0000 (11:12 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 15 Oct 2021 12:12:19 +0000 (14:12 +0200)
When the parsing of a defaults section is started, the previous anonymous
defaults section is removed. It may be a problem with referenced defaults
sections. And because all unused defautl proxies are removed after the
configuration parsing, it is not required to remove it so early.

This patch is mandatory to support TCP/HTTP rules in defaults sections.

src/cfgparse-listen.c

index cd3f92b621906fe3bae06b39f8bc9ccff237f45f..e2f412de93ac09c3a5c8e7ce2e2e815793b0fb82 100644 (file)
@@ -232,7 +232,6 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
                rc = PR_CAP_BE | PR_CAP_LB;
        else if (strcmp(args[0], "defaults") == 0) {
                /* "defaults" must first delete the last no-name defaults if any */
-               proxy_destroy_defaults(proxy_find_by_name("", PR_CAP_DEF, 0));
                curr_defproxy = NULL;
                rc = PR_CAP_DEF | PR_CAP_LISTEN;
        }