mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-13 16:26:10 +00:00
bgpd: merge vpnvx network [route-map] command
This commit merges two vty command into one single vty command Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This commit is contained in:
parent
3f22717225
commit
52c439c1f9
@ -520,37 +520,22 @@ DEFUN (no_vpnv4_network,
|
|||||||
|
|
||||||
DEFUN (vpnv6_network,
|
DEFUN (vpnv6_network,
|
||||||
vpnv6_network_cmd,
|
vpnv6_network_cmd,
|
||||||
"network X:X::X:X/M rd ASN:nn_or_IP-address:nn tag WORD",
|
"network X:X::X:X/M rd ASN:nn_or_IP-address:nn tag WORD [route-map WORD]",
|
||||||
"Specify a network to announce via BGP\n"
|
"Specify a network to announce via BGP\n"
|
||||||
"IPv6 prefix <network>/<length>, e.g., 3ffe::/16\n"
|
"IPv6 prefix <network>/<length>, e.g., 3ffe::/16\n"
|
||||||
"Specify Route Distinguisher\n"
|
"Specify Route Distinguisher\n"
|
||||||
"VPN Route Distinguisher\n"
|
"VPN Route Distinguisher\n"
|
||||||
"BGP tag\n"
|
"BGP tag\n"
|
||||||
"tag value\n")
|
"tag value\n")
|
||||||
{
|
|
||||||
int idx_ipv6_prefix = 1;
|
|
||||||
int idx_ext_community = 3;
|
|
||||||
int idx_word = 5;
|
|
||||||
return bgp_static_set_safi (SAFI_MPLS_VPN, vty, argv[idx_ipv6_prefix]->arg, argv[idx_ext_community]->arg, argv[idx_word]->arg, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
DEFUN (vpnv6_network_route_map,
|
|
||||||
vpnv6_network_route_map_cmd,
|
|
||||||
"network X:X::X:X/M rd ASN:nn_or_IP-address:nn tag WORD route-map WORD",
|
|
||||||
"Specify a network to announce via BGP\n"
|
|
||||||
"IPv6 prefix <network>/<length>, e.g., 3ffe::/16\n"
|
|
||||||
"Specify Route Distinguisher\n"
|
|
||||||
"VPN Route Distinguisher\n"
|
|
||||||
"BGP tag\n"
|
|
||||||
"tag value\n"
|
|
||||||
"route map\n"
|
|
||||||
"route map name\n")
|
|
||||||
{
|
{
|
||||||
int idx_ipv6_prefix = 1;
|
int idx_ipv6_prefix = 1;
|
||||||
int idx_ext_community = 3;
|
int idx_ext_community = 3;
|
||||||
int idx_word = 5;
|
int idx_word = 5;
|
||||||
int idx_word_2 = 7;
|
int idx_word_2 = 7;
|
||||||
return bgp_static_set_safi (SAFI_MPLS_VPN, vty, argv[idx_ipv6_prefix]->arg, argv[idx_ext_community]->arg, argv[idx_word]->arg, argv[idx_word_2]->arg);
|
if (argv[idx_word_2])
|
||||||
|
return bgp_static_set_safi (SAFI_MPLS_VPN, vty, argv[idx_ipv6_prefix]->arg, argv[idx_ext_community]->arg, argv[idx_word]->arg, argv[idx_word_2]->arg);
|
||||||
|
else
|
||||||
|
return bgp_static_set_safi (SAFI_MPLS_VPN, vty, argv[idx_ipv6_prefix]->arg, argv[idx_ext_community]->arg, argv[idx_word]->arg, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* For testing purpose, static route of MPLS-VPN. */
|
/* For testing purpose, static route of MPLS-VPN. */
|
||||||
@ -1395,7 +1380,6 @@ bgp_mplsvpn_init (void)
|
|||||||
install_element (BGP_VPNV4_NODE, &no_vpnv4_network_cmd);
|
install_element (BGP_VPNV4_NODE, &no_vpnv4_network_cmd);
|
||||||
|
|
||||||
install_element (BGP_VPNV6_NODE, &vpnv6_network_cmd);
|
install_element (BGP_VPNV6_NODE, &vpnv6_network_cmd);
|
||||||
install_element (BGP_VPNV6_NODE, &vpnv6_network_route_map_cmd);
|
|
||||||
install_element (BGP_VPNV6_NODE, &no_vpnv6_network_cmd);
|
install_element (BGP_VPNV6_NODE, &no_vpnv6_network_cmd);
|
||||||
|
|
||||||
install_element (VIEW_NODE, &show_bgp_ip_vpn_rd_cmd);
|
install_element (VIEW_NODE, &show_bgp_ip_vpn_rd_cmd);
|
||||||
|
Loading…
Reference in New Issue
Block a user