mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 00:56:19 +00:00
Merge remote-tracking branch 'origin/stable/3.0'
This commit is contained in:
commit
56afaa8bcb
137
bgpd/bgp_encap.c
137
bgpd/bgp_encap.c
@ -577,73 +577,6 @@ DEFUN (show_bgp_ipv6_encap_rd_tags,
|
|||||||
return bgp_show_encap (vty, AFI_IP6, &prd, bgp_show_type_normal, NULL, 1);
|
return bgp_show_encap (vty, AFI_IP6, &prd, bgp_show_type_normal, NULL, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFUN (show_bgp_ipv4_encap_neighbor_routes,
|
|
||||||
show_bgp_ipv4_encap_neighbor_routes_cmd,
|
|
||||||
"show [ip] bgp ipv4 encap neighbors A.B.C.D routes",
|
|
||||||
SHOW_STR
|
|
||||||
IP_STR
|
|
||||||
BGP_STR
|
|
||||||
"Address Family\n"
|
|
||||||
"Display ENCAP NLRI specific information\n"
|
|
||||||
"Detailed information on TCP and BGP neighbor connections\n"
|
|
||||||
"Neighbor to display information about\n"
|
|
||||||
"Display routes learned from neighbor\n")
|
|
||||||
{
|
|
||||||
int idx_peer = 0;
|
|
||||||
union sockunion *su;
|
|
||||||
struct peer *peer;
|
|
||||||
|
|
||||||
argv_find(argv, argc, "A.B.C.D", &idx_peer);
|
|
||||||
su = sockunion_str2su (argv[idx_peer]->arg);
|
|
||||||
|
|
||||||
if (!su)
|
|
||||||
{
|
|
||||||
vty_out (vty, "Malformed address: %s%s", argv[idx_peer]->arg, VTY_NEWLINE);
|
|
||||||
return CMD_WARNING;
|
|
||||||
}
|
|
||||||
|
|
||||||
peer = peer_lookup (NULL, su);
|
|
||||||
if (! peer || ! peer->afc[AFI_IP][SAFI_ENCAP])
|
|
||||||
{
|
|
||||||
vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE);
|
|
||||||
return CMD_WARNING;
|
|
||||||
}
|
|
||||||
|
|
||||||
return bgp_show_encap (vty, AFI_IP, NULL, bgp_show_type_neighbor, su, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
DEFUN (show_bgp_ipv6_encap_neighbor_routes,
|
|
||||||
show_bgp_ipv6_encap_neighbor_routes_cmd,
|
|
||||||
"show [ip] bgp ipv6 encap neighbors A.B.C.D routes",
|
|
||||||
SHOW_STR
|
|
||||||
IP_STR
|
|
||||||
BGP_STR
|
|
||||||
"Address Family\n"
|
|
||||||
"Display ENCAP NLRI specific information\n"
|
|
||||||
"Detailed information on TCP and BGP neighbor connections\n"
|
|
||||||
"Neighbor to display information about\n"
|
|
||||||
"Display routes learned from neighbor\n")
|
|
||||||
{
|
|
||||||
int idx_peer = 5;
|
|
||||||
union sockunion su;
|
|
||||||
struct peer *peer;
|
|
||||||
|
|
||||||
if (str2sockunion(argv[idx_peer]->arg, &su))
|
|
||||||
{
|
|
||||||
vty_out (vty, "Malformed address: %s%s", argv[idx_peer]->arg, VTY_NEWLINE);
|
|
||||||
return CMD_WARNING;
|
|
||||||
}
|
|
||||||
|
|
||||||
peer = peer_lookup (NULL, &su);
|
|
||||||
if (! peer || ! peer->afc[AFI_IP6][SAFI_ENCAP])
|
|
||||||
{
|
|
||||||
vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE);
|
|
||||||
return CMD_WARNING;
|
|
||||||
}
|
|
||||||
|
|
||||||
return bgp_show_encap (vty, AFI_IP6, NULL, bgp_show_type_neighbor, &su, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
DEFUN (show_bgp_ipv4_encap_rd_neighbor_routes,
|
DEFUN (show_bgp_ipv4_encap_rd_neighbor_routes,
|
||||||
show_bgp_ipv4_encap_rd_neighbor_routes_cmd,
|
show_bgp_ipv4_encap_rd_neighbor_routes_cmd,
|
||||||
"show [ip] bgp ipv4 encap rd ASN:nn_or_IP-address:nn neighbors <A.B.C.D|X:X::X:X> routes",
|
"show [ip] bgp ipv4 encap rd ASN:nn_or_IP-address:nn neighbors <A.B.C.D|X:X::X:X> routes",
|
||||||
@ -734,72 +667,6 @@ DEFUN (show_bgp_ipv6_encap_rd_neighbor_routes,
|
|||||||
return bgp_show_encap (vty, AFI_IP6, &prd, bgp_show_type_neighbor, &su, 0);
|
return bgp_show_encap (vty, AFI_IP6, &prd, bgp_show_type_neighbor, &su, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFUN (show_bgp_ipv4_encap_neighbor_advertised_routes,
|
|
||||||
show_bgp_ipv4_encap_neighbor_advertised_routes_cmd,
|
|
||||||
"show [ip] bgp ipv4 encap neighbors A.B.C.D advertised-routes",
|
|
||||||
SHOW_STR
|
|
||||||
IP_STR
|
|
||||||
BGP_STR
|
|
||||||
"Address Family\n"
|
|
||||||
"Display ENCAP NLRI specific information\n"
|
|
||||||
"Detailed information on TCP and BGP neighbor connections\n"
|
|
||||||
"Neighbor to display information about\n"
|
|
||||||
"Display the routes advertised to a BGP neighbor\n")
|
|
||||||
{
|
|
||||||
int idx_peer = 5;
|
|
||||||
int ret;
|
|
||||||
struct peer *peer;
|
|
||||||
union sockunion su;
|
|
||||||
|
|
||||||
ret = str2sockunion (argv[idx_peer]->arg, &su);
|
|
||||||
if (ret < 0)
|
|
||||||
{
|
|
||||||
vty_out (vty, "%% Malformed address: %s%s", argv[idx_peer]->arg, VTY_NEWLINE);
|
|
||||||
return CMD_WARNING;
|
|
||||||
}
|
|
||||||
peer = peer_lookup (NULL, &su);
|
|
||||||
if (! peer || ! peer->afc[AFI_IP][SAFI_ENCAP])
|
|
||||||
{
|
|
||||||
vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE);
|
|
||||||
return CMD_WARNING;
|
|
||||||
}
|
|
||||||
|
|
||||||
return show_adj_route_encap (vty, peer, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
DEFUN (show_bgp_ipv6_encap_neighbor_advertised_routes,
|
|
||||||
show_bgp_ipv6_encap_neighbor_advertised_routes_cmd,
|
|
||||||
"show [ip] bgp ipv6 encap neighbors A.B.C.D advertised-routes",
|
|
||||||
SHOW_STR
|
|
||||||
IP_STR
|
|
||||||
BGP_STR
|
|
||||||
"Address Family\n"
|
|
||||||
"Display ENCAP NLRI specific information\n"
|
|
||||||
"Detailed information on TCP and BGP neighbor connections\n"
|
|
||||||
"Neighbor to display information about\n"
|
|
||||||
"Display the routes advertised to a BGP neighbor\n")
|
|
||||||
{
|
|
||||||
int idx_peer = 5;
|
|
||||||
int ret;
|
|
||||||
struct peer *peer;
|
|
||||||
union sockunion su;
|
|
||||||
|
|
||||||
ret = str2sockunion (argv[idx_peer]->arg, &su);
|
|
||||||
if (ret < 0)
|
|
||||||
{
|
|
||||||
vty_out (vty, "%% Malformed address: %s%s", argv[idx_peer]->arg, VTY_NEWLINE);
|
|
||||||
return CMD_WARNING;
|
|
||||||
}
|
|
||||||
peer = peer_lookup (NULL, &su);
|
|
||||||
if (! peer || ! peer->afc[AFI_IP6][SAFI_ENCAP])
|
|
||||||
{
|
|
||||||
vty_out (vty, "%% No such neighbor or address family%s", VTY_NEWLINE);
|
|
||||||
return CMD_WARNING;
|
|
||||||
}
|
|
||||||
|
|
||||||
return show_adj_route_encap (vty, peer, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
DEFUN (show_bgp_ipv4_encap_rd_neighbor_advertised_routes,
|
DEFUN (show_bgp_ipv4_encap_rd_neighbor_advertised_routes,
|
||||||
show_bgp_ipv4_encap_rd_neighbor_advertised_routes_cmd,
|
show_bgp_ipv4_encap_rd_neighbor_advertised_routes_cmd,
|
||||||
"show [ip] bgp ipv4 encap rd ASN:nn_or_IP-address:nn neighbors <A.B.C.D|X:X::X:X> advertised-routes",
|
"show [ip] bgp ipv4 encap rd ASN:nn_or_IP-address:nn neighbors <A.B.C.D|X:X::X:X> advertised-routes",
|
||||||
@ -899,16 +766,12 @@ bgp_encap_init (void)
|
|||||||
install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_cmd);
|
install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_cmd);
|
||||||
install_element (VIEW_NODE, &show_bgp_ipv4_encap_tags_cmd);
|
install_element (VIEW_NODE, &show_bgp_ipv4_encap_tags_cmd);
|
||||||
install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_tags_cmd);
|
install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_tags_cmd);
|
||||||
install_element (VIEW_NODE, &show_bgp_ipv4_encap_neighbor_routes_cmd);
|
|
||||||
install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_neighbor_routes_cmd);
|
install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_neighbor_routes_cmd);
|
||||||
install_element (VIEW_NODE, &show_bgp_ipv4_encap_neighbor_advertised_routes_cmd);
|
|
||||||
install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_neighbor_advertised_routes_cmd);
|
install_element (VIEW_NODE, &show_bgp_ipv4_encap_rd_neighbor_advertised_routes_cmd);
|
||||||
|
|
||||||
install_element (VIEW_NODE, &show_bgp_ipv6_encap_rd_cmd);
|
install_element (VIEW_NODE, &show_bgp_ipv6_encap_rd_cmd);
|
||||||
install_element (VIEW_NODE, &show_bgp_ipv6_encap_tags_cmd);
|
install_element (VIEW_NODE, &show_bgp_ipv6_encap_tags_cmd);
|
||||||
install_element (VIEW_NODE, &show_bgp_ipv6_encap_rd_tags_cmd);
|
install_element (VIEW_NODE, &show_bgp_ipv6_encap_rd_tags_cmd);
|
||||||
install_element (VIEW_NODE, &show_bgp_ipv6_encap_neighbor_routes_cmd);
|
|
||||||
install_element (VIEW_NODE, &show_bgp_ipv6_encap_rd_neighbor_routes_cmd);
|
install_element (VIEW_NODE, &show_bgp_ipv6_encap_rd_neighbor_routes_cmd);
|
||||||
install_element (VIEW_NODE, &show_bgp_ipv6_encap_neighbor_advertised_routes_cmd);
|
|
||||||
install_element (VIEW_NODE, &show_bgp_ipv6_encap_rd_neighbor_advertised_routes_cmd);
|
install_element (VIEW_NODE, &show_bgp_ipv6_encap_rd_neighbor_advertised_routes_cmd);
|
||||||
}
|
}
|
||||||
|
@ -1196,7 +1196,6 @@ bgp_mplsvpn_init (void)
|
|||||||
install_element (VIEW_NODE, &show_ip_bgp_vpn_rd_cmd);
|
install_element (VIEW_NODE, &show_ip_bgp_vpn_rd_cmd);
|
||||||
#ifdef KEEP_OLD_VPN_COMMANDS
|
#ifdef KEEP_OLD_VPN_COMMANDS
|
||||||
install_element (VIEW_NODE, &show_ip_bgp_vpn_all_cmd);
|
install_element (VIEW_NODE, &show_ip_bgp_vpn_all_cmd);
|
||||||
install_element (VIEW_NODE, &show_ip_bgp_vpn_rd_cmd);
|
|
||||||
install_element (VIEW_NODE, &show_ip_bgp_vpn_all_tags_cmd);
|
install_element (VIEW_NODE, &show_ip_bgp_vpn_all_tags_cmd);
|
||||||
install_element (VIEW_NODE, &show_ip_bgp_vpn_rd_tags_cmd);
|
install_element (VIEW_NODE, &show_ip_bgp_vpn_rd_tags_cmd);
|
||||||
install_element (VIEW_NODE, &show_ip_bgp_vpn_all_neighbor_routes_cmd);
|
install_element (VIEW_NODE, &show_ip_bgp_vpn_all_neighbor_routes_cmd);
|
||||||
|
@ -4401,7 +4401,7 @@ bgp_static_add (struct bgp *bgp)
|
|||||||
|
|
||||||
for (rm = bgp_table_top (table); rm; rm = bgp_route_next (rm))
|
for (rm = bgp_table_top (table); rm; rm = bgp_route_next (rm))
|
||||||
{
|
{
|
||||||
bgp_static = rn->info;
|
bgp_static = rm->info;
|
||||||
bgp_static_update_safi (bgp, &rm->p, bgp_static, afi, safi);
|
bgp_static_update_safi (bgp, &rm->p, bgp_static, afi, safi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4435,7 +4435,7 @@ bgp_static_delete (struct bgp *bgp)
|
|||||||
|
|
||||||
for (rm = bgp_table_top (table); rm; rm = bgp_route_next (rm))
|
for (rm = bgp_table_top (table); rm; rm = bgp_route_next (rm))
|
||||||
{
|
{
|
||||||
bgp_static = rn->info;
|
bgp_static = rm->info;
|
||||||
bgp_static_withdraw_safi (bgp, &rm->p,
|
bgp_static_withdraw_safi (bgp, &rm->p,
|
||||||
AFI_IP, safi,
|
AFI_IP, safi,
|
||||||
(struct prefix_rd *)&rn->p,
|
(struct prefix_rd *)&rn->p,
|
||||||
@ -4462,6 +4462,8 @@ bgp_static_redo_import_check (struct bgp *bgp)
|
|||||||
afi_t afi;
|
afi_t afi;
|
||||||
safi_t safi;
|
safi_t safi;
|
||||||
struct bgp_node *rn;
|
struct bgp_node *rn;
|
||||||
|
struct bgp_node *rm;
|
||||||
|
struct bgp_table *table;
|
||||||
struct bgp_static *bgp_static;
|
struct bgp_static *bgp_static;
|
||||||
|
|
||||||
/* Use this flag to force reprocessing of the route */
|
/* Use this flag to force reprocessing of the route */
|
||||||
@ -4470,10 +4472,23 @@ bgp_static_redo_import_check (struct bgp *bgp)
|
|||||||
for (safi = SAFI_UNICAST; safi < SAFI_MAX; safi++)
|
for (safi = SAFI_UNICAST; safi < SAFI_MAX; safi++)
|
||||||
for (rn = bgp_table_top (bgp->route[afi][safi]); rn; rn = bgp_route_next (rn))
|
for (rn = bgp_table_top (bgp->route[afi][safi]); rn; rn = bgp_route_next (rn))
|
||||||
if (rn->info != NULL)
|
if (rn->info != NULL)
|
||||||
|
{
|
||||||
|
if ((safi == SAFI_MPLS_VPN) || (safi == SAFI_ENCAP) || (safi == SAFI_EVPN))
|
||||||
|
{
|
||||||
|
table = rn->info;
|
||||||
|
|
||||||
|
for (rm = bgp_table_top (table); rm; rm = bgp_route_next (rm))
|
||||||
|
{
|
||||||
|
bgp_static = rm->info;
|
||||||
|
bgp_static_update_safi (bgp, &rm->p, bgp_static, afi, safi);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
bgp_static = rn->info;
|
bgp_static = rn->info;
|
||||||
bgp_static_update (bgp, &rn->p, bgp_static, afi, safi);
|
bgp_static_update (bgp, &rn->p, bgp_static, afi, safi);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
bgp_flag_unset(bgp, BGP_FLAG_FORCE_STATIC_PROCESS);
|
bgp_flag_unset(bgp, BGP_FLAG_FORCE_STATIC_PROCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8654,7 +8669,7 @@ DEFUN (show_ip_bgp,
|
|||||||
}
|
}
|
||||||
/* prefix-longer */
|
/* prefix-longer */
|
||||||
if (argv_find(argv, argc, "A.B.C.D/M", &idx) || argv_find(argv, argc, "X:X::X:X/M", &idx))
|
if (argv_find(argv, argc, "A.B.C.D/M", &idx) || argv_find(argv, argc, "X:X::X:X/M", &idx))
|
||||||
return bgp_show_prefix_longer (vty, bgp, argv[idx + 1]->arg, afi, safi, bgp_show_type_prefix_longer);
|
return bgp_show_prefix_longer (vty, bgp, argv[idx]->arg, afi, safi, bgp_show_type_prefix_longer);
|
||||||
|
|
||||||
if (safi == SAFI_MPLS_VPN)
|
if (safi == SAFI_MPLS_VPN)
|
||||||
return bgp_show_mpls_vpn (vty, afi, NULL, bgp_show_type_normal, NULL, 0, uj);
|
return bgp_show_mpls_vpn (vty, afi, NULL, bgp_show_type_normal, NULL, 0, uj);
|
||||||
|
@ -99,3 +99,34 @@ other settings)
|
|||||||
net.ipv6.conf.all.forwarding=1
|
net.ipv6.conf.all.forwarding=1
|
||||||
|
|
||||||
**Reboot** or use `sysctl -p` to apply the same config to the running system
|
**Reboot** or use `sysctl -p` to apply the same config to the running system
|
||||||
|
|
||||||
|
### Troubleshooting
|
||||||
|
|
||||||
|
**Local state directory**
|
||||||
|
|
||||||
|
The local state directory must exist and have the correct permissions applied
|
||||||
|
for the frrouting daemons to start. In the above ./configure example the
|
||||||
|
local state directory is set to /var/run/frr (--localstatedir=/var/run/frr)
|
||||||
|
Debian considers /var/run/frr to be temporary and this is removed after a
|
||||||
|
reboot.
|
||||||
|
|
||||||
|
When using a different local state directory you need to create the new
|
||||||
|
directory and change the ownership to the frr user, for example:
|
||||||
|
|
||||||
|
mkdir /var/opt/frr
|
||||||
|
chown frr /var/opt/frr
|
||||||
|
|
||||||
|
**Shared library error**
|
||||||
|
|
||||||
|
If you try and start any of the frrouting daemons you may see the below error
|
||||||
|
due to the frrouting shared library directory not being found:
|
||||||
|
|
||||||
|
./zebra: error while loading shared libraries: libfrr.so.0: cannot open shared object file: No such file or directory
|
||||||
|
|
||||||
|
The fix is to add the following line to /etc/ld.so.conf which will continue to
|
||||||
|
reference the library directory after the system reboots. To load the library
|
||||||
|
directory path immediately run the ldconfig command after adding the line to
|
||||||
|
the file eg:
|
||||||
|
|
||||||
|
echo include /usr/local/lib >> /etc/ld.so.conf
|
||||||
|
ldconfig
|
||||||
|
@ -588,7 +588,7 @@ pretty_print_dot (FILE *ofd, unsigned opts, struct graph_node *start,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
snprintf(tokennum, sizeof(tokennum), "%d?", tok->type);
|
snprintf(tokennum, sizeof(tokennum), "%d?", tok->type);
|
||||||
fprintf(ofd, " n%016llx [ shape=box, label=<", (unsigned long long)start);
|
fprintf(ofd, " n%p [ shape=box, label=<", start);
|
||||||
|
|
||||||
fprintf(ofd, "<b>%s</b>", LOOKUP_DEF(tokennames, tok->type, tokennum));
|
fprintf(ofd, "<b>%s</b>", LOOKUP_DEF(tokennames, tok->type, tokennum));
|
||||||
if (tok->attr == CMD_ATTR_DEPRECATED)
|
if (tok->attr == CMD_ATTR_DEPRECATED)
|
||||||
@ -621,20 +621,13 @@ pretty_print_dot (FILE *ofd, unsigned opts, struct graph_node *start,
|
|||||||
struct graph_node *adj = vector_slot (start->to, i);
|
struct graph_node *adj = vector_slot (start->to, i);
|
||||||
// if this node is a vararg, just print *
|
// if this node is a vararg, just print *
|
||||||
if (adj == start) {
|
if (adj == start) {
|
||||||
fprintf(ofd, " n%016llx -> n%016llx;\n",
|
fprintf(ofd, " n%p -> n%p;\n", start, start);
|
||||||
(unsigned long long)start,
|
|
||||||
(unsigned long long)start);
|
|
||||||
} else if (((struct cmd_token *)adj->data)->type == END_TKN) {
|
} else if (((struct cmd_token *)adj->data)->type == END_TKN) {
|
||||||
//struct cmd_token *et = adj->data;
|
//struct cmd_token *et = adj->data;
|
||||||
fprintf(ofd, " n%016llx -> end%016llx;\n",
|
fprintf(ofd, " n%p -> end%p;\n", start, adj);
|
||||||
(unsigned long long)start,
|
fprintf(ofd, " end%p [ shape=box, label=<end>, style = filled, fillcolor = \"#ffddaa\" ];\n", adj);
|
||||||
(unsigned long long)adj);
|
|
||||||
fprintf(ofd, " end%016llx [ shape=box, label=<end>, style = filled, fillcolor = \"#ffddaa\" ];\n",
|
|
||||||
(unsigned long long)adj);
|
|
||||||
} else {
|
} else {
|
||||||
fprintf(ofd, " n%016llx -> n%016llx;\n",
|
fprintf(ofd, " n%p -> n%p;\n", start, adj);
|
||||||
(unsigned long long)start,
|
|
||||||
(unsigned long long)adj);
|
|
||||||
size_t k;
|
size_t k;
|
||||||
for (k = 0; k < stackpos; k++)
|
for (k = 0; k < stackpos; k++)
|
||||||
if (stack[k] == adj)
|
if (stack[k] == adj)
|
||||||
|
@ -1363,7 +1363,7 @@ DEFUNSH (VTYSH_RIPD,
|
|||||||
router_rip_cmd,
|
router_rip_cmd,
|
||||||
"router rip",
|
"router rip",
|
||||||
ROUTER_STR
|
ROUTER_STR
|
||||||
"RIP")
|
"RIP\n")
|
||||||
{
|
{
|
||||||
vty->node = RIP_NODE;
|
vty->node = RIP_NODE;
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
@ -1374,7 +1374,7 @@ DEFUNSH (VTYSH_RIPNGD,
|
|||||||
router_ripng_cmd,
|
router_ripng_cmd,
|
||||||
"router ripng",
|
"router ripng",
|
||||||
ROUTER_STR
|
ROUTER_STR
|
||||||
"RIPng")
|
"RIPng\n")
|
||||||
{
|
{
|
||||||
vty->node = RIPNG_NODE;
|
vty->node = RIPNG_NODE;
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
|
Loading…
Reference in New Issue
Block a user