From 03f99d9a4dd4b1b1c788c9c7dd48f52eecd48de4 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 18 Nov 2016 15:42:41 -0500 Subject: 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 --- zebra/interface.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'zebra/interface.c') diff --git a/zebra/interface.c b/zebra/interface.c index 31955b1fca..b87f61f920 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1773,6 +1773,16 @@ DEFUN (link_params, 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, @@ -2814,7 +2824,7 @@ link_params_config_write (struct vty *vty, struct interface *ifp) 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; } @@ -2995,6 +3005,7 @@ zebra_if_init (void) 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); install_element (CONFIG_NODE, &zebra_vrf_cmd); install_element (CONFIG_NODE, &no_vrf_cmd); -- cgit v1.2.3