Merge pull request #5354 from mitch-skiba/addpath-fix

bgpd: Fix per afi/safi addpath peer counting
This commit is contained in:
Donatas Abraitis 2019-11-19 08:38:59 +02:00 committed by GitHub
commit 47774e2757
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -321,6 +321,7 @@ 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)) {
@ -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;
}
}
}