]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: cli: Be sure to drop all input data in END state
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 17 Feb 2025 13:49:34 +0000 (14:49 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 17 Feb 2025 14:31:07 +0000 (15:31 +0100)
commit972ce87676f40daa76fff61539fb5b0a66b56f4b
tree165d8605006e3cfb4a15505ada3528558dc402b6
parentab2fa95bddd95696c045cf7bcf4164e61df5d04f
BUG/MEDIUM: cli: Be sure to drop all input data in END state

Commit 7214dcd ("BUG/MEDIUM: applet: Don't pretend to have more data to
handle EOI/EOS/ERROR") revealed a bug with the CLI applet. Pending input
data when the applet is in CLI_ST_END state were never consumed or dropped,
leading to a wakeup loop.

The CLI applet implements its own snd_buf callback function. It is important
it consumes all pending input data. Otherwise, the applet is woken up in
loop until it empties the request buffer. Another way to fix the issue would
be to report an error. But in that case, it seems reasonnable to drop these
data.

The issue can be observed on reload, in master/worker mode, because of issue
about the last ACK message which was never consummed by the _getsocks()
command.

This patch should fix the issue #2862. It must be backported to 3.1 with the
commit above.
src/cli.c