]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Reset dynamic peer counter
authorAbhishek Naik <bhini@amazon.com>
Tue, 19 Oct 2021 23:45:26 +0000 (23:45 +0000)
committermergify-bot <noreply@mergify.io>
Tue, 26 Oct 2021 06:09:43 +0000 (06:09 +0000)
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>
(cherry picked from commit 800867d85e5fae7d41131c2552dec290f2246077)

bgpd/bgp_vty.c

index 14f4fb731050b4af8825d2e8721506d6f2492401..15ff0075d3593ee880c87f025da036b74486a291 100644 (file)
@@ -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;