From: Soman K S Date: Wed, 12 Jun 2019 10:24:37 +0000 (-0700) Subject: bgpd: Process core when prefix list is applied X-Git-Tag: base_7.2~198^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=7bfdba54126b08ceb6056e9f93e756c0ec824535;p=mirror%2Ffrr.git bgpd: Process core when prefix list is applied * Added debug logs and assert to get more information when bgp process core is observed Signed-off-by: Soman K S --- diff --git a/bgpd/bgp_updgrp.c b/bgpd/bgp_updgrp.c index d0be2471af..82df1905ba 100644 --- a/bgpd/bgp_updgrp.c +++ b/bgpd/bgp_updgrp.c @@ -885,6 +885,9 @@ static void update_subgroup_add_peer(struct update_subgroup *subgrp, bpacket_add_peer(pkt, paf); bpacket_queue_sanity_check(SUBGRP_PKTQ(subgrp)); + if (BGP_DEBUG(update_groups, UPDATE_GROUPS)) + zlog_debug("peer %s added to subgroup s%" PRIu64, + paf->peer->host, subgrp->id); } /* @@ -910,6 +913,10 @@ static void update_subgroup_remove_peer_internal(struct update_subgroup *subgrp, paf->subgroup = NULL; subgrp->peer_count--; + if (BGP_DEBUG(update_groups, UPDATE_GROUPS)) + zlog_debug("peer %s deleted from subgroup s%" + PRIu64 "peer cnt %d", + paf->peer->host, subgrp->id, subgrp->peer_count); SUBGRP_INCR_STAT(subgrp, prune_events); } @@ -1826,9 +1833,9 @@ void peer_af_announce_route(struct peer_af *paf, int combine) */ if (!combine || !all_pending) { update_subgroup_split_peer(paf, NULL); - if (!paf->subgroup) - return; + subgrp = paf->subgroup; + assert(subgrp && subgrp->update_group); if (bgp_debug_update(paf->peer, NULL, subgrp->update_group, 0)) zlog_debug("u%" PRIu64 ":s%" PRIu64 " %s announcing routes",