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.
This commit is contained in:
Christopher Faulet 2021-10-13 11:12:50 +02:00
parent ff556276eb
commit 52b8a43d4e

View 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;
}