mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-10 00:57:02 +02:00
BUG/MINOR: config: don't propagate process binding on fatal errors.
propagate_processes() must not be called with unresolved proxies, but nothing prevents it from being called in check_config_validity(). The resulting effect is that an unresolved proxy can cause a recursion loop if called in such a situation, ending with a segfault after the fatal error report. There's no side effect beyond this. This patch refrains from calling the function when any error was met. This bug also affects 1.5, it should be backported.
This commit is contained in:
parent
4e21ff9244
commit
acbe8ab38a
@ -7246,10 +7246,14 @@ int check_config_validity()
|
||||
global.stats_fe->bind_proc = ~0UL;
|
||||
}
|
||||
|
||||
/* propagate bindings from frontends to backends */
|
||||
for (curproxy = proxy; curproxy; curproxy = curproxy->next) {
|
||||
if (curproxy->cap & PR_CAP_FE)
|
||||
propagate_processes(curproxy, NULL);
|
||||
/* propagate bindings from frontends to backends. Don't do it if there
|
||||
* are any fatal errors as we must not call it with unresolved proxies.
|
||||
*/
|
||||
if (!cfgerr) {
|
||||
for (curproxy = proxy; curproxy; curproxy = curproxy->next) {
|
||||
if (curproxy->cap & PR_CAP_FE)
|
||||
propagate_processes(curproxy, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/* Bind each unbound backend to all processes when not specified. */
|
||||
|
Loading…
Reference in New Issue
Block a user