Merge pull request #14041 from opensourcerouting/fix/memory_leak_bgp_redistribute_add

bgpd: Do not try to redistribute routes if we are shutting down
This commit is contained in:
Donald Sharp 2023-07-18 10:55:22 -04:00 committed by GitHub
commit 4a986f20d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8650,6 +8650,10 @@ void bgp_redistribute_add(struct bgp *bgp, struct prefix *p,
route_map_result_t ret;
struct bgp_redist *red;
if (CHECK_FLAG(bgp->flags, BGP_FLAG_DELETE_IN_PROGRESS) ||
bgp->peer_self == NULL)
return;
/* Make default attribute. */
bgp_attr_default_set(&attr, bgp, BGP_ORIGIN_INCOMPLETE);
/*