mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-29 12:52:39 +00:00
bgpd: bgp_best_selection ensure dest still exists
When reaping the dest ensure that it still exists as that it should be locked by the calling function. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
dc01a8ba03
commit
c955a3cbec
@ -2815,9 +2815,11 @@ void bgp_best_selection(struct bgp *bgp, struct bgp_dest *dest,
|
|||||||
/* reap REMOVED routes, if needs be
|
/* reap REMOVED routes, if needs be
|
||||||
* selected route must stay for a while longer though
|
* selected route must stay for a while longer though
|
||||||
*/
|
*/
|
||||||
if (CHECK_FLAG(pi->flags, BGP_PATH_REMOVED)
|
if (CHECK_FLAG(pi->flags, BGP_PATH_REMOVED) &&
|
||||||
&& (pi != old_select))
|
(pi != old_select)) {
|
||||||
bgp_path_info_reap(dest, pi);
|
dest = bgp_path_info_reap(dest, pi);
|
||||||
|
assert(dest);
|
||||||
|
}
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
|
Loading…
Reference in New Issue
Block a user