vty list: fix deprecation/hidden bit logic

If a command is both hidden and deprecated, still don't show it for the 'list'
command.

We currently have no such nodes, as it seems, though.

Related: OS#3584
Change-Id: I07ec15cab057a3e09064e0420a69121ee8eb4253
This commit is contained in:
Neels Hofmeyr 2018-09-24 04:16:42 +02:00 committed by Harald Welte
parent cf8def25d5
commit a7557fe0f5
1 changed files with 1 additions and 2 deletions

View File

@ -2728,8 +2728,7 @@ gDEFUN(config_list, config_list_cmd, "list", "Print command list\n")
for (i = 0; i < vector_active(cnode->cmd_vector); i++)
if ((cmd = vector_slot(cnode->cmd_vector, i)) != NULL
&& !(cmd->attr == CMD_ATTR_DEPRECATED
|| cmd->attr == CMD_ATTR_HIDDEN))
&& !(cmd->attr & (CMD_ATTR_DEPRECATED | CMD_ATTR_HIDDEN)))
vty_out(vty, " %s%s", cmd->string, VTY_NEWLINE);
return CMD_SUCCESS;
}