summaryrefslogtreecommitdiffstats
path: root/vtysh
diff options
context:
space:
mode:
authorLouis Scalbert <louis.scalbert@6wind.com>2023-02-09 14:11:49 +0100
committerLouis Scalbert <louis.scalbert@6wind.com>2023-09-18 14:39:56 +0200
commitae2f3bb5b4eed01df1f7a69c7710c9be519390f6 (patch)
tree44c3209af699d535cc8f79f16a2b66cc417bc7eb /vtysh
parentyang: add bgp link-state (diff)
downloadfrr-ae2f3bb5b4eed01df1f7a69c7710c9be519390f6.tar.xz
frr-ae2f3bb5b4eed01df1f7a69c7710c9be519390f6.zip
bgpd: add bgp link-state address-family configuration context
Add the bgp link-state configuration context cli: > router bgp 65001 > address-family link-state link-state > neighbor 192.0.2.2 activate > exit-address-family Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'vtysh')
-rw-r--r--vtysh/vtysh.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 113a15c17..050807ccd 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -1447,6 +1447,13 @@ static struct cmd_node bgp_ipv6l_node = {
.no_xpath = true,
};
+static struct cmd_node bgp_ls_node = {
+ .name = "bgp link-state",
+ .node = BGP_LS_NODE,
+ .parent_node = BGP_NODE,
+ .prompt = "%s(config-router-af-ls)# ",
+};
+
#ifdef ENABLE_BGP_VNC
static struct cmd_node bgp_vnc_defaults_node = {
.name = "bgp vnc defaults",
@@ -1758,6 +1765,14 @@ DEFUNSH(VTYSH_BGPD, address_family_flowspecv6, address_family_flowspecv6_cmd,
return CMD_SUCCESS;
}
+DEFUNSH(VTYSH_BGPD, address_family_linkstate, address_family_linkstate_cmd,
+ "address-family link-state link-state",
+ "Enter Address Family command mode\n" BGP_AF_STR BGP_AF_MODIFIER_STR)
+{
+ vty->node = BGP_LS_NODE;
+ return CMD_SUCCESS;
+}
+
DEFUNSH(VTYSH_BGPD, address_family_ipv4_multicast,
address_family_ipv4_multicast_cmd, "address-family ipv4 multicast",
"Enter Address Family command mode\n"
@@ -2420,7 +2435,8 @@ DEFUNSH(VTYSH_BGPD, exit_address_family, exit_address_family_cmd,
|| vty->node == BGP_IPV6L_NODE || vty->node == BGP_IPV6M_NODE
|| vty->node == BGP_EVPN_NODE
|| vty->node == BGP_FLOWSPECV4_NODE
- || vty->node == BGP_FLOWSPECV6_NODE)
+ || vty->node == BGP_FLOWSPECV6_NODE
+ || vty->node == BGP_LS_NODE)
vty->node = BGP_NODE;
return CMD_SUCCESS;
}
@@ -4671,6 +4687,13 @@ void vtysh_init_vty(void)
install_element(BGP_EVPN_VNI_NODE, &vtysh_end_all_cmd);
install_element(BGP_EVPN_VNI_NODE, &exit_vni_cmd);
+ install_node(&bgp_ls_node);
+ install_element(BGP_NODE, &address_family_linkstate_cmd);
+ install_element(BGP_LS_NODE, &vtysh_exit_bgpd_cmd);
+ install_element(BGP_LS_NODE, &vtysh_quit_bgpd_cmd);
+ install_element(BGP_LS_NODE, &vtysh_end_all_cmd);
+ install_element(BGP_LS_NODE, &exit_address_family_cmd);
+
install_node(&rpki_node);
install_element(CONFIG_NODE, &rpki_cmd);
install_element(RPKI_NODE, &rpki_exit_cmd);