]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: server: reject from/name in peers section
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 1 Dec 2026 12:58:55 +0000 (13:58 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 1 Dec 2026 15:01:28 +0000 (16:01 +0100)
commit0e166c943812e603fe33f6daa96b7b100645468c
tree6147e449a5bcc02c1a4003ef60be1334dfad364d
parent3085933cd7ad27bcb23f815d463145f386f4129c
BUG/MINOR: server: reject from/name in peers section

The new positional keywords 'from' and 'name' were introduced to extend
server inheritance. However, nothing was implemented to ensure they were
rejected in a peers section.

Thus, it would be possible for a peer server to inherit from a
default-server in a standard backend. This could cause unexpected
behavior as a peer server does not support the full keyword range of the
instances declared in standard proxies.

Clarify this situation by rejecting usage of these keywords in a peers
section. A fatal error is reported if this is encountered.

Note that _srv_parse_from() is still called for peers server and
default-server, as it is necessary to preserve the original unnamed
default-server overloading mechanism. The new error is only reported if
'from' is found.

This is not a breaking change since 'from' and 'name' were implemented
in the current dev branch.

No need to backport.
src/server.c