mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-12 22:41:03 +01:00
BUG/MINOR: config: add a missing "ELIF_TAKE" test for ".elif" condition evaluator
This missing state was causing a second elif condition to be evaluated
after a first one succeeded after a .if failed. For example in the test
below the else would be executed:
.if 0
.elif 1
.elif 0
.else
.endif
No backport is needed, this is 2.4-only.
This commit is contained in:
parent
6e647c94f2
commit
f67ff02072
@ -1891,6 +1891,7 @@ next_line:
|
||||
|
||||
if (nested_conds[nested_cond_lvl] == NESTED_COND_IF_TAKE ||
|
||||
nested_conds[nested_cond_lvl] == NESTED_COND_IF_SKIP ||
|
||||
nested_conds[nested_cond_lvl] == NESTED_COND_ELIF_TAKE ||
|
||||
nested_conds[nested_cond_lvl] == NESTED_COND_ELIF_SKIP) {
|
||||
nested_conds[nested_cond_lvl] = NESTED_COND_ELIF_SKIP;
|
||||
} else if (!*args[1] || *args[1] == '0') {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user