From: Donald Sharp Date: Wed, 30 May 2018 13:37:03 +0000 (-0400) Subject: bgpd: Notice when peer_clear fails X-Git-Tag: frr-6.1-dev~393^2~2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=a9bafa95d05789154aa9482d20aa73fb42ff3489;p=mirror%2Ffrr.git bgpd: Notice when peer_clear fails Issue Found by Coverity Scan. When we call peer_clear we are checking the return code in every other call. Add a bit of extra code to notice the failure and note it. Signed-off-by: Donald Sharp --- diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 132fa5fc9d..390bdaeca3 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -2551,7 +2551,9 @@ static int bgp_maximum_prefix_restart_timer(struct thread *thread) "%s Maximum-prefix restart timer expired, restore peering", peer->host); - peer_clear(peer, NULL); + if ((peer_clear(peer, NULL) < 0) && bgp_debug_neighbor_events(peer)) + zlog_debug("%s: %s peer_clear failed", + __PRETTY_FUNCTION__, peer->host); return 0; }