diff --git a/bin/varnishd/mgt/mgt_cli.c b/bin/varnishd/mgt/mgt_cli.c index c3b27d49819..c58d1af1f46 100644 --- a/bin/varnishd/mgt/mgt_cli.c +++ b/bin/varnishd/mgt/mgt_cli.c @@ -185,7 +185,7 @@ mcf_askchild(struct cli *cli, const char * const *av, void *priv) } cmd = mgt_cmd_lookup(av[1]); - if (cmd != NULL && CMD_INTERNAL(cmd)) { + if (cmd == NULL || CMD_INTERNAL(cmd)) { VCLI_Out(cli, "Unknown request.\nType 'help' for more info.\n"); VCLI_SetResult(cli, CLIS_UNKNOWN); return; diff --git a/bin/varnishtest/tests/b00008.vtc b/bin/varnishtest/tests/b00008.vtc index 755d6e4b430..4321ea17183 100644 --- a/bin/varnishtest/tests/b00008.vtc +++ b/bin/varnishtest/tests/b00008.vtc @@ -49,3 +49,5 @@ varnish v1 -cliexpect 60 "param.show first_byte_timeout" varnish v1 -cliok "param.set cli_limit 128" varnish v1 -clierr 201 "param.show" + +varnish v1 -clierr 101 "\"vcl.use foo\""