From: Donatas Abraitis Date: Tue, 24 May 2022 07:04:50 +0000 (+0300) Subject: bgpd: Don't increment twice notification sent stats counter X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=19c8a94c29b5be37335b1759657ea4eb02fee6a7;p=matthieu%2Ffrr.git bgpd: Don't increment twice notification sent stats counter 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 (cherry picked from commit 41b1d7a3a4a24c1db1f1efb9eaacf6435605de8c) --- diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index b0fdcbda14..7c92a8d9e8 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -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;