summaryrefslogtreecommitdiffstats
path: root/lib/command.c
diff options
context:
space:
mode:
authorPavel Ivashchenko <pivashchenko@nfware.com>2019-09-30 17:57:10 +0200
committerIgor Ryzhov <iryzhov@nfware.com>2021-04-29 17:35:07 +0200
commit4bb7f7c2dd35fd76db3f8d552e990f6c16f33992 (patch)
tree58d7c21087b6a24350ab920279107b49e8e1db41 /lib/command.c
parentMerge pull request #8531 from mjstapp/fix_backups_misc (diff)
downloadfrr-4bb7f7c2dd35fd76db3f8d552e990f6c16f33992.tar.xz
frr-4bb7f7c2dd35fd76db3f8d552e990f6c16f33992.zip
vtysh: fix searching commands in parent nodes
Do not check parent command nodes in case of ambiguous and incomplete commands Signed-off-by: Pavel Ivashchenko <pivashchenko@nfware.com>
Diffstat (limited to 'lib/command.c')
-rw-r--r--lib/command.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/command.c b/lib/command.c
index 7fb405bdf..2f0736746 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -1049,6 +1049,7 @@ int cmd_execute_command(vector vline, struct vty *vty,
return saved_ret;
if (ret != CMD_SUCCESS && ret != CMD_WARNING
+ && ret != CMD_ERR_AMBIGUOUS && ret != CMD_ERR_INCOMPLETE
&& ret != CMD_NOT_MY_INSTANCE && ret != CMD_WARNING_CONFIG_FAILED) {
/* This assumes all nodes above CONFIG_NODE are childs of
* CONFIG_NODE */
@@ -1062,6 +1063,7 @@ int cmd_execute_command(vector vline, struct vty *vty,
ret = cmd_execute_command_real(vline, FILTER_RELAXED,
vty, cmd, 0);
if (ret == CMD_SUCCESS || ret == CMD_WARNING
+ || ret == CMD_ERR_AMBIGUOUS || ret == CMD_ERR_INCOMPLETE
|| ret == CMD_NOT_MY_INSTANCE
|| ret == CMD_WARNING_CONFIG_FAILED)
return ret;
@@ -1260,6 +1262,7 @@ int command_config_read_one_line(struct vty *vty,
while (!(use_daemon && ret == CMD_SUCCESS_DAEMON)
&& !(!use_daemon && ret == CMD_ERR_NOTHING_TODO)
&& ret != CMD_SUCCESS && ret != CMD_WARNING
+ && ret != CMD_ERR_AMBIGUOUS && ret != CMD_ERR_INCOMPLETE
&& ret != CMD_NOT_MY_INSTANCE && ret != CMD_WARNING_CONFIG_FAILED
&& ret != CMD_NO_LEVEL_UP)
ret = cmd_execute_command_real(vline, FILTER_STRICT, vty, cmd,