From: William Lallemand Date: Mon, 29 Oct 2018 16:14:00 +0000 (+0100) Subject: BUG/MINOR: cli: forward the whole command on master CLI X-Git-Tag: v1.9-dev6~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=744de5b52ad1ade82205b27aa9421f5ac88f84cf;p=thirdparty%2Fhaproxy.git BUG/MINOR: cli: forward the whole command on master CLI A bug occurs when the CLI proxy of the master received a command which is prefixed by some spaces but without a routing prefix (@). In this case the pcli_parse_request() was returning a wrong number of data to forward. The response analyzer was called twice and the prompt displayed twice. --- diff --git a/src/cli.c b/src/cli.c index e1b527465f..510e1e3496 100644 --- a/src/cli.c +++ b/src/cli.c @@ -1766,7 +1766,7 @@ int pcli_parse_request(struct channel *req, int *target_pid) if (*pfx_b != '@') { /* there is no prefix */ pfx_b = NULL; - cmd_b = ptr; + cmd_b = input; /* if no prefix we don't trim anything */ state = PCLI_REQ_CMD; continue; }