Skip to content

Commit

Permalink
bgpd: supplementary lock for when the bmp module is not loaded
Browse files Browse the repository at this point in the history
Signed-off-by: Maxence Younsi <[email protected]>
  • Loading branch information
mxyns committed Dec 21, 2023
1 parent dd21a63 commit fa98a15
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bgpd/bgp_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -3401,6 +3401,9 @@ static void bgp_process_main_one(struct bgp *bgp, struct bgp_dest *dest,
* set
*/
if (old_select || new_select) {
if (old_select)
bgp_path_info_lock(old_select);

hook_call(bgp_route_update, bgp, afi, safi, dest, old_select,
new_select);
}
Expand Down Expand Up @@ -3590,6 +3593,7 @@ static void bgp_process_main_one(struct bgp *bgp, struct bgp_dest *dest,
old_select->peer->stat_loc_rib_count[afi][safi]--;

hook_call(bgp_process_main_one_end, bgp, old_select);
bgp_path_info_unlock(old_select);
}

if (new_select && new_select->peer)
Expand All @@ -3610,7 +3614,6 @@ static void bgp_process_main_one(struct bgp *bgp, struct bgp_dest *dest,
}
bgp_mpath_diff_clear(&mpath_diff);
bgp_mpath_diff_fini(&mpath_diff);
return;
}

/* Process the routes with the flag BGP_NODE_SELECT_DEFER set */
Expand Down

0 comments on commit fa98a15

Please sign in to comment.