From: Mitch Skiba Date: Thu, 14 Nov 2019 19:28:23 +0000 (+0000) Subject: bgpd: Fix per afi/safi addpath peer counting X-Git-Tag: frr-7.2.1~23^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=5d0eedd41035dedf998f9a6132b23ca7c6e13adc;p=matthieu%2Ffrr.git bgpd: Fix per afi/safi addpath peer counting The total_peercount table was created as a short cut for queries about if addpath was enabled at all on a particular afi/safi. However, the values weren't updated, so BGP would act as if addpath wasn't enabled when determining if updates should be sent out. The error in behavior was much more noticeable in tx-all than best-per-as, since changes in what is sent by best-per-as would often trigger updates even if addpath wasn't enabled. Signed-off-by: Mitchell Skiba --- diff --git a/bgpd/bgp_addpath.c b/bgpd/bgp_addpath.c index 0ca4b613ee..cf51960b70 100644 --- a/bgpd/bgp_addpath.c +++ b/bgpd/bgp_addpath.c @@ -321,6 +321,7 @@ void bgp_addpath_type_changed(struct bgp *bgp) for (type=0; typetx_addpath.total_peercount[afi][safi] = 0; } for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) { @@ -328,6 +329,7 @@ void bgp_addpath_type_changed(struct bgp *bgp) type = peer->addpath_type[afi][safi]; if (type != BGP_ADDPATH_NONE) { peer_count[afi][safi][type] += 1; + bgp->tx_addpath.total_peercount[afi][safi] += 1; } } }