]> 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)
committerDonatas Abraitis <donatas.abraitis@gmail.com>
Tue, 26 Oct 2021 06:07:13 +0000 (09:07 +0300)
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>
bgpd/bgp_vty.c

index 195776744311f3f6d572e06df8981a9a75ee1d59..3c0b10ac873f995cb7d8fa075fddaf0132a80c21 100644 (file)
@@ -9715,6 +9715,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 */
+       dn_count = 0;
        for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) {
                if (!CHECK_FLAG(peer->flags, PEER_FLAG_CONFIG_NODE))
                        continue;