]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: cfgparse/peers: provide more info when ignoring invalid "peer" or "server...
authorAurelien DARRAGON <adarragon@haproxy.com>
Fri, 7 Mar 2025 08:30:47 +0000 (09:30 +0100)
committerAurelien DARRAGON <adarragon@haproxy.com>
Fri, 7 Mar 2025 08:39:51 +0000 (09:39 +0100)
commitdbb25720dd7157e0f180d17486f10340f80a9fda
tree327be6fece2e69645f60cc81d8a0ad3c5c178b7f
parenta76b5358f0400568b641dc373cbd582875cd6aa6
MINOR: cfgparse/peers: provide more info when ignoring invalid "peer" or "server" lines

Invalid (incomplete) "server" or "peer" lines under peers section are now
properly ignored. For completeness, in this patch we add some reports so
that the user knows that incomplete lines were ignored.

For an incomplete server line, since it is tolerated (see GH #565), we
only emit a diag warning.

For an incomplete peer line, we report a real warning, as it is not
expected to have a peer line without an address:port specified.

Also, 'newpeer == curpeers->local' check could be simplified since
we already have the 'local_peer' variable which tells us that the
parsed line refers to a local peer.
src/cfgparse.c