summaryrefslogtreecommitdiffstats
path: root/vtysh
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-06-28 20:37:01 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-06-28 20:37:01 +0200
commit8d70e7fe3225c6137d6bbf9cbe6b9e53b00b935b (patch)
treee2e5254b423eee3e5d9cedf8c5493f91fdeb97f0 /vtysh
parentMerge pull request #2563 from pacovn/Coverity_1465494_String_not_null_termina... (diff)
downloadfrr-8d70e7fe3225c6137d6bbf9cbe6b9e53b00b935b.tar.xz
frr-8d70e7fe3225c6137d6bbf9cbe6b9e53b00b935b.zip
vtysh: fix autocomplete garbage printouts
The semantics for suppressing output received from daemons changed slightly when pipe actions were introduced, causing raw autocomplete output to be printed where it shouldn't have been. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'vtysh')
-rw-r--r--vtysh/vtysh.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 0697cd8b7..b56eaa899 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -3357,9 +3357,12 @@ static void vtysh_autocomplete(vector comps, struct cmd_token *token)
snprintf(accmd, sizeof(accmd), "autocomplete %d %s %s", token->type,
token->text, token->varname ? token->varname : "-");
+ vty->of_saved = vty->of;
+ vty->of = NULL;
for (i = 0; i < array_size(vtysh_client); i++)
vtysh_client_run_all(&vtysh_client[i], accmd, 1, vtysh_ac_line,
comps);
+ vty->of = vty->of_saved;
}
static const struct cmd_variable_handler vtysh_var_handler[] = {