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.
diff --git a/zebra/interface.c b/zebra/interface.c
index c5835f4..f8b946f 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -1625,6 +1625,16 @@
return CMD_SUCCESS;
}
+DEFUN (exit_link_params,
+ exit_link_params_cmd,
+ "exit-link-params",
+ "Exit from Link Params configuration mode\n")
+{
+ if (vty->node == LINK_PARAMS_NODE)
+ vty->node = INTERFACE_NODE;
+ return CMD_SUCCESS;
+}
+
/* Specific Traffic Engineering parameters commands */
DEFUN (link_params_enable,
link_params_enable_cmd,
@@ -2636,7 +2646,7 @@
if (IS_PARAM_SET(iflp, LP_RMT_AS))
vty_out(vty, " neighbor %s as %u%s", inet_ntoa(iflp->rmt_ip),
iflp->rmt_as, VTY_NEWLINE);
- vty_out(vty, " exit%s", VTY_NEWLINE);
+ vty_out(vty, " exit-link-params%s", VTY_NEWLINE);
return 0;
}
@@ -2803,4 +2813,5 @@
install_element(LINK_PARAMS_NODE, &no_link_params_res_bw_cmd);
install_element(LINK_PARAMS_NODE, &link_params_use_bw_cmd);
install_element(LINK_PARAMS_NODE, &no_link_params_use_bw_cmd);
+ install_element(LINK_PARAMS_NODE, &exit_link_params_cmd);
}