From: Christopher Faulet Date: Wed, 13 Oct 2021 09:12:50 +0000 (+0200) Subject: MINOR: config: No longer remove previous anonymous defaults section X-Git-Tag: v2.5-dev10~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=52b8a43d4e85a9f2429cfe7ca58d38cd64829a0d;p=thirdparty%2Fhaproxy.git MINOR: config: No longer remove previous anonymous defaults section 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. --- diff --git a/src/cfgparse-listen.c b/src/cfgparse-listen.c index cd3f92b621..e2f412de93 100644 --- a/src/cfgparse-listen.c +++ b/src/cfgparse-listen.c @@ -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; }