diff options
author | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-09-06 11:38:30 +0200 |
---|---|---|
committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-09-06 11:51:35 +0200 |
commit | 7e7f61ed494255ac57a37a2daa749b3dcec776a4 (patch) | |
tree | 0bbc44be08ddcda937de45a5a1b8966e4c6d96c5 /bgpd/bgp_rpki.c | |
parent | bgpd: Drop unused functions (diff) | |
download | frr-7e7f61ed494255ac57a37a2daa749b3dcec776a4.tar.xz frr-7e7f61ed494255ac57a37a2daa749b3dcec776a4.zip |
bgpd: Unlock bgp_dest after bgp_table_subtree_lookup()
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'bgpd/bgp_rpki.c')
-rw-r--r-- | bgpd/bgp_rpki.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bgpd/bgp_rpki.c b/bgpd/bgp_rpki.c index de1c55964..b90c09c68 100644 --- a/bgpd/bgp_rpki.c +++ b/bgpd/bgp_rpki.c @@ -428,14 +428,15 @@ static void bgpd_sync_callback(struct thread *thread) safi_t safi; for (safi = SAFI_UNICAST; safi < SAFI_MAX; safi++) { - if (!bgp->rib[afi][safi]) + struct bgp_table *table = bgp->rib[afi][safi]; + + if (!table) continue; struct bgp_dest *match; struct bgp_dest *node; - match = bgp_table_subtree_lookup(bgp->rib[afi][safi], - prefix); + match = bgp_table_subtree_lookup(table, prefix); node = match; while (node) { @@ -445,6 +446,9 @@ static void bgpd_sync_callback(struct thread *thread) node = bgp_route_next_until(node, match); } + + if (match) + bgp_dest_unlock_node(match); } } |