From c6c2ef1f1189a39fdea429f2792c3bd0a1679a08 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Wed, 20 Aug 2025 15:50:37 +0200 Subject: [PATCH] BUG/MEDIUM: cli: Report inbuf is no longer full when a line is consumed When the command line parsing was refactored (20ec1de21 "MAJOR: cli: Refacor parsing and execution of pipelined commands"), a regression was introduced. When input data are consumed, information about the applet's input buffer are no longer updated accordingly to state it is no longer full. So it is possible to freeze the CLI applet. And a spinning loop may be encountered if a client shutdown is detected in this state. The fix is obivous. When data are consumed from the applet's input buffer, APPCTX_FL_INBLK_FULL flag is removed to notify the input buffer is no longer full and more data can be sent to the CLI applet. This patch should fix the issue #3064. It must be backported to 3.2. --- src/cli.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cli.c b/src/cli.c index 09a356c00..027cab1e4 100644 --- a/src/cli.c +++ b/src/cli.c @@ -974,6 +974,7 @@ int cli_parse_cmdline(struct appctx *appctx) b_del(&appctx->inbuf, len); b_add(appctx->cli_ctx.cmdline, len); + applet_fl_clr(appctx, APPCTX_FL_INBLK_FULL); if (!(appctx->st1 & APPCTX_CLI_ST1_PAYLOAD)) { char *last_arg;