If the desired state is the same - do nothing instead of resetting once again.
Fixes: bdb5ae8bce94432eb5e581f04f48dc4aa5db7ca4 ("bgpd: Make suppress-fib-pending clear peering")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit
7fb4c03f5b1c9cd4e8acb85b4cf953ac85aa0bbf)
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