Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bgpd:'bgpd' core generated on Leaf device with system-test config #7433

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions bgpd/bgp_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -6657,6 +6657,9 @@ static void bgp_aggregate_install(

if (!attr) {
bgp_aggregate_delete(bgp, p, afi, safi, aggregate);
if (BGP_DEBUG(update_groups, UPDATE_GROUPS))
zlog_debug("%s: %pFX null attribute", __func__,
p);
return;
}

Expand Down Expand Up @@ -7175,6 +7178,13 @@ static void bgp_add_route_to_aggregate(struct bgp *bgp,
struct ecommunity *ecommunity = NULL;
struct lcommunity *lcommunity = NULL;

/* If the bgp instance is being deleted or self peer is deleted
* then do not create aggregate route
*/
if (CHECK_FLAG(bgp->flags, BGP_FLAG_DELETE_IN_PROGRESS)
|| (bgp->peer_self == NULL))
return;

/* ORIGIN attribute: If at least one route among routes that are
* aggregated has ORIGIN with the value INCOMPLETE, then the
* aggregated route must have the ORIGIN attribute with the value
Expand Down Expand Up @@ -7291,6 +7301,13 @@ static void bgp_remove_route_from_aggregate(struct bgp *bgp, afi_t afi,
struct lcommunity *lcommunity = NULL;
unsigned long match = 0;

/* If the bgp instance is being deleted or self peer is deleted
* then do not create aggregate route
*/
if (CHECK_FLAG(bgp->flags, BGP_FLAG_DELETE_IN_PROGRESS)
|| (bgp->peer_self == NULL))
return;

if (BGP_PATH_HOLDDOWN(pi))
return;

Expand Down Expand Up @@ -7487,6 +7504,13 @@ int bgp_aggregate_unset(struct bgp *bgp, struct prefix *prefix, afi_t afi,
struct bgp_dest *dest;
struct bgp_aggregate *aggregate;

/* If the bgp instance is being deleted or self peer is deleted
* then do not create aggregate route
*/
if (CHECK_FLAG(bgp->flags, BGP_FLAG_DELETE_IN_PROGRESS)
|| (bgp->peer_self == NULL))
return 0;

apply_mask(prefix);
/* Old configuration check. */
dest = bgp_node_lookup(bgp->aggregate[afi][safi], prefix);
Expand Down