Skip to content

Commit

Permalink
Merge pull request #5367 from ton31337/fix/addpath_total_peer_update_7.0
Browse files Browse the repository at this point in the history
bgpd: [7.0] Fix per afi/safi addpath peer counting
  • Loading branch information
donaldsharp committed Nov 19, 2019
2 parents 48ff241 + af2c772 commit 9ac885c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bgpd/bgp_addpath.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,13 +317,15 @@ void bgp_addpath_type_changed(struct bgp *bgp)
for (type=0; type<BGP_ADDPATH_MAX; type++) {
peer_count[afi][safi][type] = 0;
}
bgp->tx_addpath.total_peercount[afi][safi] = 0;
}

for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) {
FOREACH_AFI_SAFI(afi, safi) {
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;
}
}
}
Expand Down

0 comments on commit 9ac885c

Please sign in to comment.