From 3067bfa815afce9217c5f7cf0812e2575583a2fa Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 5 Dec 2016 14:50:15 +0100 Subject: [PATCH] BUG/MEDIUM: cli: fix "show stat resolvers" and "show tls-keys" 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 | 2 +- src/ssl_sock.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dns.c b/src/dns.c index 1e286ff08..012fcede4 100644 --- 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. diff --git a/src/ssl_sock.c b/src/ssl_sock.c index 8429324a4..baaa0a107 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -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; }