0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2025-03-11 17:08:46 +00:00

BGP Export Table: Fixed route source objects leaking when prefix best routes is updated

This commit is contained in:
Maria Matejka 2023-03-08 19:28:31 +01:00
parent 2898f8f177
commit 227352c461

View File

@ -1702,7 +1702,16 @@ bgp_get_prefix(struct bgp_pending_tx *c, const net_addr *net, struct rte_src *sr
struct bgp_prefix *px = HASH_FIND(c->prefix_hash, PXH, net, path_id_hash, hash);
if (px)
{
if (!add_path_tx && (path_id != px->path_id))
{
rt_unlock_source(rt_find_source_global(px->path_id));
rt_lock_source(src);
px->path_id = path_id;
}
return px;
}
if (c->prefix_slab)
px = sl_alloc(c->prefix_slab);