summaryrefslogtreecommitdiffstats
path: root/vtysh/vtysh.c
diff options
context:
space:
mode:
authorPavel Ivashchenko <pivashchenko@nfware.com>2019-09-30 17:57:10 +0200
committerPavel Ivashchenko <pivashchenko@nfware.com>2019-10-08 14:18:15 +0200
commitd741915ecdcf8930ccb3bd23eec1da2f0d000483 (patch)
tree83fc05ef9745cb919a79a79177f10a8c03677322 /vtysh/vtysh.c
parentMerge pull request #5009 from donaldsharp/interface_deletion (diff)
downloadfrr-d741915ecdcf8930ccb3bd23eec1da2f0d000483.tar.xz
frr-d741915ecdcf8930ccb3bd23eec1da2f0d000483.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 'vtysh/vtysh.c')
-rw-r--r--vtysh/vtysh.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 08126f688..0c7a7471b 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -492,6 +492,7 @@ static int vtysh_execute_func(const char *line, int pager)
*/
while (ret != CMD_SUCCESS && ret != CMD_SUCCESS_DAEMON
&& ret != CMD_WARNING && ret != CMD_WARNING_CONFIG_FAILED
+ && ret != CMD_ERR_AMBIGUOUS && ret != CMD_ERR_INCOMPLETE
&& vty->node > CONFIG_NODE) {
vty->node = node_parent(vty->node);
ret = cmd_execute(vty, line, &cmd, 1);
@@ -777,6 +778,7 @@ int vtysh_mark_file(const char *filename)
*/
while (ret != CMD_SUCCESS && ret != CMD_SUCCESS_DAEMON
&& ret != CMD_WARNING && ret != CMD_WARNING_CONFIG_FAILED
+ && ret != CMD_ERR_AMBIGUOUS && ret != CMD_ERR_INCOMPLETE
&& vty->node > CONFIG_NODE) {
vty->node = node_parent(vty->node);
ret = cmd_execute_command_strict(vline, vty, &cmd);