]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: config: Properly test warnif_misplaced_* return values
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 24 Mar 2026 17:21:13 +0000 (18:21 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 27 Mar 2026 06:35:25 +0000 (07:35 +0100)
commitd1c7e565858bd491b8a42c1e432923c0536dbe2a
tree6c4c9b58c19b55a7c9d4316460c0349cab38c9a1
parent4e99cddde4164caada7e3aafaaba7a2495f3b6a9
BUG/MINOR: config: Properly test warnif_misplaced_* return values

warnif_misplaced_* functions return 1 when a warning is reported and 0
otherwise. So the caller must properly handle the return value.

When parsing a proxy, ERR_WARN code must be added to the error code instead
of the return value. When a warning was reported, ERR_RETRYABLE (1) was
added instead of ERR_WARN.

And when tcp rules were parsed, warnings were ignored. Message were emitted
but the return values were ignored.

This patch should be backported to all stable versions.
src/cfgparse-listen.c
src/tcp_rules.c