]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: cli: fix "show stat resolvers" and "show tls-keys"
authorWilly Tarreau <w@1wt.eu>
Mon, 5 Dec 2016 13:50:15 +0000 (14:50 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 5 Dec 2016 13:53:37 +0000 (14:53 +0100)
The recent CLI reorganization managed to break these two commands
by having their parser return 1 (indicating an end of processing)
instead of 0 to indicate new calls to the io handler were needed.

Namely the faulty commits are :
  69e9644 ("REORG: cli: move show stat resolvers to dns.c")
  32af203 ("REORG: cli: move ssl CLI functions to ssl_sock.c")

The fix is trivial and there is no other loss of functionality. Thanks
to Dragan Dosen for reporting the issue and the faulty commits. The
backport is needed in 1.7.

src/dns.c
src/ssl_sock.c

index 1e286ff08c3f946649f745b5019db858ca9f026e..012fcede4f9a4e513dc2a02449ba82113ba44c0a 100644 (file)
--- a/src/dns.c
+++ b/src/dns.c
@@ -1286,7 +1286,7 @@ static int cli_parse_stat_resolvers(char **args, struct appctx *appctx, void *pr
                        return 1;
                }
        }
-       return 1;
+       return 0;
 }
 
 /* This function dumps counters from all resolvers section and associated name servers.
index 8429324a4144397184e886b482ed73efaf55fa25..baaa0a107417dbb09abb51b36720c688a90dc20f 100644 (file)
@@ -6140,7 +6140,7 @@ static int cli_parse_show_tlskeys(char **args, struct appctx *appctx, void *priv
        if (!*args[2]) {
                appctx->ctx.tlskeys.dump_all = 1;
                appctx->io_handler = cli_io_handler_tlskeys_files;
-               return 1;
+               return 0;
        }
 
        if (args[2][0] == '*') {
@@ -6156,7 +6156,7 @@ static int cli_parse_show_tlskeys(char **args, struct appctx *appctx, void *priv
                }
        }
        appctx->io_handler = cli_io_handler_tlskeys_entries;
-       return 1;
+       return 0;
 }