]> git.puffer.fish Git - mirror/frr.git/commitdiff
Revert "bgpd: clear ip bgp dampening was not triggering the route calculation for...
authorIgor Ryzhov <iryzhov@nfware.com>
Mon, 2 Aug 2021 10:05:22 +0000 (13:05 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Fri, 6 Aug 2021 18:36:41 +0000 (21:36 +0300)
This reverts commit c8ddbd48040be6bf33c4f0ab3e470f290f9b165a.

bgpd/bgp_damp.c
bgpd/bgp_damp.h
bgpd/bgp_route.c

index 3db142b8cfe02b95b412452807a6b66504bb579d..b740979b82a993f509d2af989b54749026341c58 100644 (file)
@@ -545,8 +545,7 @@ int bgp_damp_enable(struct bgp *bgp, afi_t afi, safi_t safi, time_t half,
 }
 
 /* Clean all the bgp_damp_info stored in reuse_list and no_reuse_list. */
-void bgp_damp_info_clean(struct bgp *bgp, struct bgp_damp_config *bdc,
-                        afi_t afi, safi_t safi)
+void bgp_damp_info_clean(struct bgp_damp_config *bdc, afi_t afi, safi_t safi)
 {
        struct bgp_damp_info *bdi;
        struct reuselist_node *rn;
@@ -558,13 +557,6 @@ void bgp_damp_info_clean(struct bgp *bgp, struct bgp_damp_config *bdc,
                list = &bdc->reuse_list[i];
                while ((rn = SLIST_FIRST(list)) != NULL) {
                        bdi = rn->info;
-                       if (bdi->lastrecord == BGP_RECORD_UPDATE) {
-                               bgp_aggregate_increment(bgp, &bdi->dest->p,
-                                                       bdi->path, bdi->afi,
-                                                       bdi->safi);
-                               bgp_process(bgp, bdi->dest, bdi->afi,
-                                           bdi->safi);
-                       }
                        bgp_reuselist_del(list, &rn);
                        bgp_damp_info_free(&bdi, bdc, 1, afi, safi);
                }
@@ -615,7 +607,7 @@ int bgp_damp_disable(struct bgp *bgp, afi_t afi, safi_t safi)
        thread_cancel(&bdc->t_reuse);
 
        /* Clean BGP dampening information.  */
-       bgp_damp_info_clean(bgp, bdc, afi, safi);
+       bgp_damp_info_clean(bdc, afi, safi);
 
        UNSET_FLAG(bgp->af_flags[afi][safi], BGP_CONFIG_DAMPENING);
 
@@ -904,7 +896,7 @@ void bgp_peer_damp_disable(struct peer *peer, afi_t afi, safi_t safi)
        bdc = &peer->damp[afi][safi];
        if (!bdc)
                return;
-       bgp_damp_info_clean(peer->bgp, bdc, afi, safi);
+       bgp_damp_info_clean(bdc, afi, safi);
        UNSET_FLAG(peer->af_flags[afi][safi], PEER_FLAG_CONFIG_DAMPENING);
 }
 
index 3c8f138d6a805c680d2d1d1073ed7d3f76ac023d..521f59b296553901fafc1870a433f1bbf9075022 100644 (file)
@@ -151,8 +151,8 @@ extern int bgp_damp_update(struct bgp_path_info *path, struct bgp_dest *dest,
 extern void bgp_damp_info_free(struct bgp_damp_info **path,
                               struct bgp_damp_config *bdc, int withdraw,
                               afi_t afi, safi_t safi);
-extern void bgp_damp_info_clean(struct bgp *bgp, struct bgp_damp_config *bdc,
-                               afi_t afi, safi_t safi);
+extern void bgp_damp_info_clean(struct bgp_damp_config *bdc, afi_t afi,
+                               safi_t safi);
 extern void bgp_damp_config_clean(struct bgp_damp_config *bdc);
 extern int bgp_damp_decay(time_t, int, struct bgp_damp_config *damp);
 extern void bgp_config_write_damp(struct vty *vty, struct bgp *bgp, afi_t afi,
index 1632c9302db416ea04a20e1783f1d6573efdd90f..47402d798f1d13392b722b8515488965a434aeef 100644 (file)
@@ -14380,21 +14380,6 @@ static int bgp_clear_damp_route(struct vty *vty, const char *view_name,
                                while (pi) {
                                        if (pi->extra && pi->extra->damp_info) {
                                                pi_temp = pi->next;
-                                               struct bgp_damp_info *bdi =
-                                                       pi->extra->damp_info;
-                                               if (bdi->lastrecord
-                                                   == BGP_RECORD_UPDATE) {
-                                                       bgp_aggregate_increment(
-                                                               bgp,
-                                                               &bdi->dest->p,
-                                                               bdi->path,
-                                                               bdi->afi,
-                                                               bdi->safi);
-                                                       bgp_process(bgp,
-                                                                   bdi->dest,
-                                                                   bdi->afi,
-                                                                   bdi->safi);
-                                               }
                                                bgp_damp_info_free(
                                                        &pi->extra->damp_info,
                                                        &bgp->damp[afi][safi],
@@ -14421,7 +14406,7 @@ DEFUN (clear_ip_bgp_dampening,
        "Clear route flap dampening information\n")
 {
        VTY_DECLVAR_CONTEXT(bgp, bgp);
-       bgp_damp_info_clean(bgp, &bgp->damp[AFI_IP][SAFI_UNICAST], AFI_IP,
+       bgp_damp_info_clean(&bgp->damp[AFI_IP][SAFI_UNICAST], AFI_IP,
                            SAFI_UNICAST);
        return CMD_SUCCESS;
 }