bgpd: In bgp_clear_route_table ensure dest is still usable.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
Donald Sharp 2023-09-10 09:53:54 -04:00
parent c955a3cbec
commit 1195c44f4b

View File

@ -5690,9 +5690,10 @@ static void bgp_clear_route_table(struct peer *peer, afi_t afi, safi_t safi,
if (pi->peer != peer) if (pi->peer != peer)
continue; continue;
if (force) if (force) {
bgp_path_info_reap(dest, pi); dest = bgp_path_info_reap(dest, pi);
else { assert(dest);
} else {
struct bgp_clear_node_queue *cnq; struct bgp_clear_node_queue *cnq;
/* both unlocked in bgp_clear_node_queue_del */ /* both unlocked in bgp_clear_node_queue_del */