]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Don't increment twice notification sent stats counter
authorDonatas Abraitis <donatas@opensourcerouting.org>
Tue, 24 May 2022 07:04:50 +0000 (10:04 +0300)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Tue, 24 May 2022 07:20:09 +0000 (10:20 +0300)
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>
bgpd/bgp_packet.c

index c8996ba634e0a1ee26a24d0bd38ebd8ad24132cb..55604698386d8eeaa81d32554ec1eee9558a2f62 100644 (file)
@@ -733,7 +733,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;