]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: log: LF upsets maxlen for UDP targets
authorAurelien DARRAGON <adarragon@haproxy.com>
Tue, 27 Jun 2023 09:32:06 +0000 (11:32 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 10 Jul 2023 16:28:08 +0000 (18:28 +0200)
commit901f31bc9a97b972d8e36362c6f4659f42532194
treea973dbddb5caf72750b39d37bd5e782c715cb556
parentc103379847d199752ff0206aabb34cc7c0455c4c
BUG/MINOR: log: LF upsets maxlen for UDP targets

A regression was introduced with 5464885 ("MEDIUM: log/sink: re-work
and merge of build message API.").

For UDP targets, a final '\n' is systematically inserted, but with the
rework of the build message API, it is inserted after the maxlen
limitation has been enforced, so this can lead to the final message
becoming maxlen+1. For strict syslog servers that only accept up to
maxlen characters, this could be a problem.

To fix the regression, we take the final '\n' into account prior to
building the message, like it was done before the rework of the API.

This should be backported up to 2.4.
src/log.c