mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 11:18:43 +00:00
Merge pull request #15352 from louis-6wind/fix-leak-recursive
bgpd: fix route recursion on leaked routes
This commit is contained in:
commit
26faf341ef
@ -1511,6 +1511,7 @@ void bgp_zebra_announce(struct bgp_dest *dest, const struct prefix *p,
|
|||||||
struct bgp_path_info *info, struct bgp *bgp, afi_t afi,
|
struct bgp_path_info *info, struct bgp *bgp, afi_t afi,
|
||||||
safi_t safi)
|
safi_t safi)
|
||||||
{
|
{
|
||||||
|
struct bgp_path_info *bpi_ultimate;
|
||||||
struct zapi_route api = { 0 };
|
struct zapi_route api = { 0 };
|
||||||
unsigned int valid_nh_count = 0;
|
unsigned int valid_nh_count = 0;
|
||||||
bool allow_recursion = false;
|
bool allow_recursion = false;
|
||||||
@ -1554,15 +1555,9 @@ void bgp_zebra_announce(struct bgp_dest *dest, const struct prefix *p,
|
|||||||
|
|
||||||
peer = info->peer;
|
peer = info->peer;
|
||||||
|
|
||||||
if (info->type == ZEBRA_ROUTE_BGP
|
if (info->type == ZEBRA_ROUTE_BGP) {
|
||||||
&& info->sub_type == BGP_ROUTE_IMPORTED) {
|
bpi_ultimate = bgp_get_imported_bpi_ultimate(info);
|
||||||
|
peer = bpi_ultimate->peer;
|
||||||
/* Obtain peer from parent */
|
|
||||||
if (info->extra && info->extra->vrfleak &&
|
|
||||||
info->extra->vrfleak->parent)
|
|
||||||
peer = ((struct bgp_path_info *)(info->extra->vrfleak
|
|
||||||
->parent))
|
|
||||||
->peer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tag = info->attr->tag;
|
tag = info->attr->tag;
|
||||||
|
@ -891,4 +891,11 @@ luCommand(
|
|||||||
"pass",
|
"pass",
|
||||||
"Redundant route 2 details",
|
"Redundant route 2 details",
|
||||||
)
|
)
|
||||||
|
luCommand(
|
||||||
|
"r1",
|
||||||
|
'vtysh -c "show ip route vrf r1-cust5 5.1.0.0/24"',
|
||||||
|
"Known via .bgp., distance 200, .* vrf r1-cust5, best",
|
||||||
|
"pass",
|
||||||
|
"Recursive route leak details",
|
||||||
|
)
|
||||||
# done
|
# done
|
||||||
|
Loading…
Reference in New Issue
Block a user