mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 09:00:55 +00:00
bgpd: Fix peer determination from parent for imported routes
When routes are imported into a VRF from the global VPN table, the parent instance is either the default instance in the case of L3VPN or the source VRF in the case of VRF-to-VRF route leaking. Hence, obtain the source peer by just looking at the parent route information. Ticket: CM-20283 Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
This commit is contained in:
parent
53089bec65
commit
1ec90b5ede
@ -1082,16 +1082,9 @@ void bgp_zebra_announce(struct bgp_node *rn, struct prefix *p,
|
||||
if (info->type == ZEBRA_ROUTE_BGP
|
||||
&& info->sub_type == BGP_ROUTE_IMPORTED) {
|
||||
|
||||
struct bgp_info *bi;
|
||||
|
||||
/*
|
||||
* Look at parent chain for peer sort
|
||||
*/
|
||||
for (bi = info; bi->extra && bi->extra->parent;
|
||||
bi = bi->extra->parent) {
|
||||
|
||||
peer = ((struct bgp_info *)(bi->extra->parent))->peer;
|
||||
}
|
||||
/* Obtain peer from parent */
|
||||
if (info->extra && info->extra->parent)
|
||||
peer = ((struct bgp_info *)(info->extra->parent))->peer;
|
||||
}
|
||||
|
||||
tag = info->attr->tag;
|
||||
|
Loading…
Reference in New Issue
Block a user