summaryrefslogtreecommitdiff
path: root/bgpd/bgp_addpath.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_addpath.c')
-rw-r--r--bgpd/bgp_addpath.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/bgpd/bgp_addpath.c b/bgpd/bgp_addpath.c
index 0ca4b613ee..e7e7c3cc1f 100644
--- a/bgpd/bgp_addpath.c
+++ b/bgpd/bgp_addpath.c
@@ -24,7 +24,7 @@
#include "bgp_addpath.h"
#include "bgp_route.h"
-static struct bgp_addpath_strategy_names strat_names[BGP_ADDPATH_MAX] = {
+static const struct bgp_addpath_strategy_names strat_names[BGP_ADDPATH_MAX] = {
{
.config_name = "addpath-tx-all-paths",
.human_name = "All",
@@ -41,7 +41,7 @@ static struct bgp_addpath_strategy_names strat_names[BGP_ADDPATH_MAX] = {
}
};
-static struct bgp_addpath_strategy_names unknown_names = {
+static const struct bgp_addpath_strategy_names unknown_names = {
.config_name = "addpath-tx-unknown",
.human_name = "Unknown-Addpath-Strategy",
.human_description = "Unknown Addpath Strategy",
@@ -53,7 +53,7 @@ static struct bgp_addpath_strategy_names unknown_names = {
* Returns a structure full of strings associated with an addpath type. Will
* never return null.
*/
-struct bgp_addpath_strategy_names *
+const struct bgp_addpath_strategy_names *
bgp_addpath_names(enum bgp_addpath_strat strat)
{
if (strat < BGP_ADDPATH_MAX)
@@ -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;
}
}
}