]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: cli: do not reject the "/<fd>" form of "show fd" master
authorOlivier Houchard <ohouchard@haproxy.com>
Wed, 29 Jul 2026 20:39:22 +0000 (22:39 +0200)
committerOlivier Houchard <cognet@ci0.org>
Wed, 29 Jul 2026 20:52:29 +0000 (22:52 +0200)
Commit da554b7ef added the tgid/fd argument form, where tgid is
optional, and a missing tgid would mean "in each thread group".
However the code considered everything that was not a digit a filter
type, and as / was not a valid filter type, we'd just get an output of
"Invalid FD type".
Fix that by not considering / a filter character.

This must be backported to 3.4.

src/cli.c

index d6c2479b494888d4bd7af9fac21bd09f24170938..8f3c74727ff07916613be659eb587216676b8bb5 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -1841,7 +1841,7 @@ static int cli_parse_show_fd(char **args, char *payload, struct appctx *appctx,
        if (*args[arg] == '!' || *args[arg] == '-')
                ctx->show_mask = CLI_SHOWFD_F_ANY;
 
-       while (*args[arg] && !isdigit((uchar)*args[arg])) {
+       while (*args[arg] && !isdigit((uchar)*args[arg]) && *args[arg] != '/') {
                uint flag = 0, inv = 0;
                c = args[arg];
                while (*c) {