MINOR: server: Forbid server definitions in frontend sections
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 13 Jan 2021 12:14:13 +0000 (13:14 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 26 Jan 2021 09:05:50 +0000 (10:05 +0100)
commit75ffbf98be972f2a5f32c2acddc00503c45e63ff
treef82753f3dcfd7b1ad04b98a2d6065f422c0ca618
parent9e2f322ce5a0c8b7acfa5201c9a027a65bcab032
MINOR: server: Forbid server definitions in frontend sections

An fatal error is now reported if a server is defined in a frontend
section. til now, a warning was just emitted and the server was ignored. The
warning was added in the 1.3.4 when the frontend/backend keywords were
introduced to allow a smooth transition and to not break existing
configs. It is old enough now to emit an fatal error in this case.

This patch is related to the issue #1043. It may be backported at least as
far as 2.2, and possibly to older versions. It relies on the previous commit
("MINOR: config: Add failifnotcap() to emit an alert on proxy capabilities").

(cherry picked from commit e3bdc81f8aeb02b5c92b5d10fc9352daaea1cf20)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/server.c