summaryrefslogtreecommitdiffstats
path: root/vtysh
diff options
context:
space:
mode:
authorWesley Coakley <wcoakley@nvidia.com>2020-10-06 22:07:02 +0200
committerWesley Coakley <wcoakley@nvidia.com>2020-10-06 23:32:07 +0200
commit662a1b050093567d96ebab3e98c22effe712e85b (patch)
treebc0685125142bb8a513015b131d1137ad08f3b35 /vtysh
parentMerge pull request #7248 from donaldsharp/revert_7113 (diff)
downloadfrr-662a1b050093567d96ebab3e98c22effe712e85b.tar.xz
frr-662a1b050093567d96ebab3e98c22effe712e85b.zip
vtysh: Fix vtysh node build warn errors
Two vtysh nodes were misplaced during a recent refactor and were not included under appropriate #ifdef directives and consequently triggered build warnings (errors) Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
Diffstat (limited to 'vtysh')
-rw-r--r--vtysh/vtysh.c37
1 files changed, 18 insertions, 19 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 63610a328..5f8d6603f 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -1773,6 +1773,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 */
@@ -2106,17 +2124,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")
{
@@ -2142,14 +2149,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",