summaryrefslogtreecommitdiffstats
path: root/bgpd
diff options
context:
space:
mode:
authorAbhishek Naik <bhini@amazon.com>2021-10-20 01:45:26 +0200
committerAbhishek Naik <bhini@amazon.com>2021-10-20 01:50:42 +0200
commit800867d85e5fae7d41131c2552dec290f2246077 (patch)
tree31c87f92f3f4d6db6f620e0b6e0d92f94e67521d /bgpd
parentMerge pull request #9760 from mobash-rasool/ospfv2-bug-fixes-02 (diff)
downloadfrr-800867d85e5fae7d41131c2552dec290f2246077.tar.xz
frr-800867d85e5fae7d41131c2552dec290f2246077.zip
bgpd: Reset dynamic peer counter
Dynamic peer count is inconsistent in "show bgp summary json" and "show bgp summary failed json" due to dynamic peer counter 'dn_count' being reused without resetting Signed-off-by: Abhishek Naik <bhini@amazon.com>
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgp_vty.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
index 14f4fb731..15ff0075d 100644
--- a/bgpd/bgp_vty.c
+++ b/bgpd/bgp_vty.c
@@ -10249,6 +10249,7 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi,
count = 0; /* Reset the value as its used again */
filtered_count = 0;
+ dn_count = 0;
for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) {
if (!CHECK_FLAG(peer->flags, PEER_FLAG_CONFIG_NODE))
continue;