bgpd: Do not reset peers on suppress-fib toggling

If the desired state is the same - do nothing instead of resetting once again.

Fixes: bdb5ae8bce ("bgpd: Make suppress-fib-pending clear peering")

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 7fb4c03f5b)
This commit is contained in:
Donatas Abraitis 2024-11-22 10:30:37 +02:00 committed by Mergify
parent a414010917
commit f62baf6ca9

View File

@ -462,6 +462,10 @@ void bgp_suppress_fib_pending_set(struct bgp *bgp, bool set)
if (bgp->inst_type == BGP_INSTANCE_TYPE_VIEW)
return;
/* Do nothing if already in a desired state */
if (set == !!CHECK_FLAG(bgp->flags, BGP_FLAG_SUPPRESS_FIB_PENDING))
return;
if (set) {
SET_FLAG(bgp->flags, BGP_FLAG_SUPPRESS_FIB_PENDING);
/* Send msg to zebra for the first instance of bgp enabled