Skip to content

Commit

Permalink
bgpd: Do not reset peers on suppress-fib toggling
Browse files Browse the repository at this point in the history
If the desired state is the same - do nothing instead of resetting once again.

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

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 7fb4c03)
  • Loading branch information
ton31337 authored and mergify[bot] committed Nov 22, 2024
1 parent 3216383 commit 02d922c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bgpd/bgpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,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
Expand Down

0 comments on commit 02d922c

Please sign in to comment.