]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Don't increment twice notification sent stats counter 11264/head
authorDonatas Abraitis <donatas@opensourcerouting.org>
Tue, 24 May 2022 07:04:50 +0000 (10:04 +0300)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Tue, 24 May 2022 11:51:07 +0000 (11:51 +0000)
Before:

```
$ vtysh -c 'clear ip bgp 192.168.10.17'
$ vtysh -c 'show bgp neighbor 192.168.10.17 json' | jq '."192.168.10.17".messageStats.notificationsSent'
2
```

After:

```
$ vtysh -c 'clear ip bgp 192.168.10.17'
$ vtysh -c 'show bgp neighbor 192.168.10.17 json' | jq '."192.168.10.17".messageStats.notificationsSent'
1
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 41b1d7a3a4a24c1db1f1efb9eaacf6435605de8c)

bgpd/bgp_packet.c

index b0fdcbda1457398a8fa085089649c6684d2de3c0..7c92a8d9e83ff4c1bf93f1329bd124b6e1d889a5 100644 (file)
@@ -699,7 +699,6 @@ static void bgp_write_notify(struct peer *peer)
 
        /* Type should be notify. */
        atomic_fetch_add_explicit(&peer->notify_out, 1, memory_order_relaxed);
-       peer->notify_out++;
 
        /* Double start timer. */
        peer->v_start *= 2;