summaryrefslogtreecommitdiffstats
path: root/vtysh/vtysh.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2016-11-18 21:42:41 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-11-18 21:42:41 +0100
commit03f99d9a4dd4b1b1c788c9c7dd48f52eecd48de4 (patch)
tree72cce894e5e07fcdd4e1277171e4842f0f816a33 /vtysh/vtysh.c
parentMerge remote-tracking branch 'opensourcerouting/cmaster-next-linkpar' into cm... (diff)
downloadfrr-03f99d9a4dd4b1b1c788c9c7dd48f52eecd48de4.tar.xz
frr-03f99d9a4dd4b1b1c788c9c7dd48f52eecd48de4.zip
vtysh, zebra: Fix link-params to use exit-link-params
Fix the link-params submode to use the 'exit-link-params' to indicate we are exiting a submode. Fixup all the relevant bits. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'vtysh/vtysh.c')
-rw-r--r--vtysh/vtysh.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 17dd58a4a..6c00058c1 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -1976,6 +1976,17 @@ DEFUNSH (VTYSH_ZEBRA,
return CMD_SUCCESS;
}
+DEFUNSH (VTYSH_ZEBRA,
+ exit_link_params,
+ exit_link_params_cmd,
+ "exit-link-params",
+ "Exit from Link Params configuration node\n")
+{
+ if (vty->node == LINK_PARAMS_NODE)
+ vty->node = INTERFACE_NODE;
+ return CMD_SUCCESS;
+}
+
/* Memory */
DEFUN (vtysh_show_memory,
vtysh_show_memory_cmd,
@@ -3288,6 +3299,7 @@ vtysh_init_vty (void)
install_element (INTERFACE_NODE, &no_interface_desc_cmd);
install_element (INTERFACE_NODE, &vtysh_end_all_cmd);
install_element (INTERFACE_NODE, &vtysh_exit_interface_cmd);
+ install_element (LINK_PARAMS_NODE, &exit_link_params_cmd);
install_element (LINK_PARAMS_NODE, &vtysh_end_all_cmd);
install_element (LINK_PARAMS_NODE, &vtysh_exit_interface_cmd);
install_element (INTERFACE_NODE, &vtysh_quit_interface_cmd);