mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-03 18:09:25 +00:00
BUG/MINOR: srv: do not init address if backend is disabled
Do not proceed on init_addr if the backend of the server is marked as disabled. When marked as disabled, the server is not fully initialized and some operation must be avoided to prevent segfault. It is correct because there is no way to activate a disabled backend. This fixes the github issue #1031. This should be backported to 2.2.
This commit is contained in:
parent
1e9a66603f
commit
e3c4192962
@ -4233,7 +4233,7 @@ int srv_init_addr(void)
|
||||
struct server *srv;
|
||||
|
||||
/* servers are in backend only */
|
||||
if (!(curproxy->cap & PR_CAP_BE))
|
||||
if (!(curproxy->cap & PR_CAP_BE) || curproxy->disabled)
|
||||
goto srv_init_addr_next;
|
||||
|
||||
for (srv = curproxy->srv; srv; srv = srv->next)
|
||||
|
Loading…
Reference in New Issue
Block a user