diff options
author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2020-10-12 20:31:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-12 20:31:04 +0200 |
commit | cefa7492f50d63ea8d04bfb865911c08027d8dc1 (patch) | |
tree | eca3ee604407c88f91cc94a26af2f05386f5b736 /vtysh | |
parent | Merge pull request #7284 from donaldsharp/pmax (diff) | |
parent | vtysh: ignore generated file vtysh_daemons.h (diff) | |
download | frr-cefa7492f50d63ea8d04bfb865911c08027d8dc1.tar.xz frr-cefa7492f50d63ea8d04bfb865911c08027d8dc1.zip |
Merge pull request #7251 from wesleycoakley/fix-vtysh-node-build-warn-errors
vtysh: fix build-time errors for some --enable flags
Diffstat (limited to 'vtysh')
-rw-r--r-- | vtysh/.gitignore | 1 | ||||
-rw-r--r-- | vtysh/vtysh.c | 37 |
2 files changed, 19 insertions, 19 deletions
diff --git a/vtysh/.gitignore b/vtysh/.gitignore index c1a39b8a1..118b84407 100644 --- a/vtysh/.gitignore +++ b/vtysh/.gitignore @@ -1,3 +1,4 @@ vtysh vtysh_cmd.c extract.pl +vtysh_daemons.h diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index b70318c62..8a1e71a37 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -1772,6 +1772,24 @@ DEFUNSH(VTYSH_BGPD, vnc_l2_group, vnc_l2_group_cmd, "vnc l2-group NAME", vty->node = BGP_VNC_L2_GROUP_NODE; return CMD_SUCCESS; } + +DEFUNSH(VTYSH_BGPD, exit_vnc_config, exit_vnc_config_cmd, "exit-vnc", + "Exit from VNC configuration mode\n") +{ + if (vty->node == BGP_VNC_DEFAULTS_NODE + || vty->node == BGP_VNC_NVE_GROUP_NODE + || vty->node == BGP_VNC_L2_GROUP_NODE) + vty->node = BGP_NODE; + return CMD_SUCCESS; +} + +DEFUNSH(VTYSH_BGPD, exit_vrf_policy, exit_vrf_policy_cmd, "exit-vrf-policy", + "Exit from VRF policy configuration mode\n") +{ + if (vty->node == BGP_VRF_POLICY_NODE) + vty->node = BGP_NODE; + return CMD_SUCCESS; +} #endif #endif /* HAVE_BGPD */ @@ -2105,17 +2123,6 @@ DEFUNSH(VTYSH_BGPD, exit_vni, exit_vni_cmd, "exit-vni", "Exit from VNI mode\n") return CMD_SUCCESS; } -DEFUNSH(VTYSH_BGPD, exit_vnc_config, exit_vnc_config_cmd, "exit-vnc", - "Exit from VNC configuration mode\n") -{ - if (vty->node == BGP_VNC_DEFAULTS_NODE - || vty->node == BGP_VNC_NVE_GROUP_NODE - || vty->node == BGP_VNC_L2_GROUP_NODE) - vty->node = BGP_NODE; - return CMD_SUCCESS; - -} - DEFUNSH(VTYSH_BGPD, rpki_exit, rpki_exit_cmd, "exit", "Exit current mode and down to previous mode\n") { @@ -2141,14 +2148,6 @@ DEFUNSH(VTYSH_BGPD, bmp_quit, bmp_quit_cmd, "quit", { return bmp_exit(self, vty, argc, argv); } - -DEFUNSH(VTYSH_BGPD, exit_vrf_policy, exit_vrf_policy_cmd, "exit-vrf-policy", - "Exit from VRF policy configuration mode\n") -{ - if (vty->node == BGP_VRF_POLICY_NODE) - vty->node = BGP_NODE; - return CMD_SUCCESS; -} #endif /* HAVE_BGPD */ DEFUNSH(VTYSH_VRF, exit_vrf_config, exit_vrf_config_cmd, "exit-vrf", |