diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-11-18 15:42:41 -0500 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-11-18 15:42:41 -0500 |
| commit | 03f99d9a4dd4b1b1c788c9c7dd48f52eecd48de4 (patch) | |
| tree | 72cce894e5e07fcdd4e1277171e4842f0f816a33 /zebra/interface.c | |
| parent | 80922366a0642e5e24a653cacd03e6023a188049 (diff) | |
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 'zebra/interface.c')
| -rw-r--r-- | zebra/interface.c | 13 |
1 files changed, 12 insertions, 1 deletions
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); |
