summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_vty.c2
-rw-r--r--vtysh/vtysh.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index 2aa4e3ecd4..93d22087bb 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -7163,7 +7163,7 @@ DEFUN_NOSH (address_family_vpnv6,
vty->node = BGP_VPNV6_NODE;
return CMD_SUCCESS;
}
-#endif
+#endif /* KEEP_OLD_VPN_COMMANDS */
DEFUN_NOSH (address_family_evpn,
address_family_evpn_cmd,
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 9ff869e503..1f1152d364 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -1305,6 +1305,7 @@ DEFUNSH(VTYSH_BGPD, router_bgp, router_bgp_cmd,
return CMD_SUCCESS;
}
+#ifdef KEEP_OLD_VPN_COMMANDS
DEFUNSH(VTYSH_BGPD, address_family_vpnv4, address_family_vpnv4_cmd,
"address-family vpnv4 [unicast]",
"Enter Address Family command mode\n"
@@ -1324,6 +1325,7 @@ DEFUNSH(VTYSH_BGPD, address_family_vpnv6, address_family_vpnv6_cmd,
vty->node = BGP_VPNV6_NODE;
return CMD_SUCCESS;
}
+#endif /* KEEP_OLD_VPN_COMMANDS */
DEFUNSH(VTYSH_BGPD, address_family_ipv4, address_family_ipv4_cmd,
"address-family ipv4 [unicast]",
@@ -3735,8 +3737,10 @@ void vtysh_init_vty(void)
install_element(CONFIG_NODE, &router_isis_cmd);
install_element(CONFIG_NODE, &router_openfabric_cmd);
install_element(CONFIG_NODE, &router_bgp_cmd);
+#ifdef KEEP_OLD_VPN_COMMANDS
install_element(BGP_NODE, &address_family_vpnv4_cmd);
install_element(BGP_NODE, &address_family_vpnv6_cmd);
+#endif /* KEEP_OLD_VPN_COMMANDS */
#if defined(ENABLE_BGP_VNC)
install_element(BGP_NODE, &vnc_vrf_policy_cmd);
install_element(BGP_NODE, &vnc_defaults_cmd);