Skip to content

Commit

Permalink
Merge pull request #14904 from opensourcerouting/fix/9561f9671dbfb77e…
Browse files Browse the repository at this point in the history
…c7d319cd19c88e4be506004b_9.0

bgpd: fix bgp_best_selection heap-use-after-free
  • Loading branch information
donaldsharp authored Nov 29, 2023
2 parents cf8f9f9 + 3f9c59d commit 88950a3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bgpd/bgp_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -2758,16 +2758,16 @@ void bgp_best_selection(struct bgp *bgp, struct bgp_dest *dest,
/* reap REMOVED routes, if needs be
* selected route must stay for a while longer though
*/
if (CHECK_FLAG(pi->flags, BGP_PATH_REMOVED)
&& (pi != old_select))
bgp_path_info_reap(dest, pi);

if (debug)
zlog_debug(
"%s: %pBD(%s) pi from %s in holddown",
__func__, dest, bgp->name_pretty,
pi->peer->host);

if (CHECK_FLAG(pi->flags, BGP_PATH_REMOVED) &&
(pi != old_select))
bgp_path_info_reap(dest, pi);

continue;
}

Expand Down

0 comments on commit 88950a3

Please sign in to comment.