summaryrefslogtreecommitdiff
path: root/bgpd
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgp_damp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/bgpd/bgp_damp.c b/bgpd/bgp_damp.c
index a5138833..2820f17c 100644
--- a/bgpd/bgp_damp.c
+++ b/bgpd/bgp_damp.c
@@ -498,6 +498,10 @@ bgp_damp_info_clean (void)
int
bgp_damp_disable (struct bgp *bgp, afi_t afi, safi_t safi)
{
+ /* If it wasn't enabled, there's nothing to do. */
+ if (! CHECK_FLAG (bgp->af_flags[afi][safi], BGP_CONFIG_DAMPENING))
+ return 0;
+
/* Cancel reuse thread. */
if (damp->t_reuse )
thread_cancel (damp->t_reuse);