summaryrefslogtreecommitdiffstats
path: root/bgpd/bgpd.c
diff options
context:
space:
mode:
authorDavid Schweizer <dschweizer@opensourcerouting.org>2020-11-02 16:30:01 +0100
committerDavid Schweizer <dschweizer@opensourcerouting.org>2020-11-02 16:30:01 +0100
commit40ec3340be9cdda62eea349fe9ee21e65156f422 (patch)
tree20ca36ad3a30204699f6a3e2933f5bdef0dff886 /bgpd/bgpd.c
parentMerge pull request #7828 from mobash-rasool/pim-fixes-3 (diff)
downloadfrr-40ec3340be9cdda62eea349fe9ee21e65156f422.tar.xz
frr-40ec3340be9cdda62eea349fe9ee21e65156f422.zip
bgpd: peer / peer group dampening profiles
Changes implement dampening profiles for peers and peer groups. This is achieved by introducing the possibility to have multible existing dampening configurations with their own sets of parameters and lists of associated paths. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org> Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
Diffstat (limited to 'bgpd/bgpd.c')
-rw-r--r--bgpd/bgpd.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index 026b57193..190cd600b 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -2379,6 +2379,14 @@ int peer_delete(struct peer *peer)
bgp_bfd_deregister_peer(peer);
+ /* Delete peer route flap dampening configuration. This needs to happen
+ * before removing the peer from peer groups.
+ */
+ FOREACH_AFI_SAFI (afi, safi)
+ if (peer_af_flag_check(peer, afi, safi,
+ PEER_FLAG_CONFIG_DAMPENING))
+ bgp_peer_damp_disable(peer, afi, safi);
+
/* If this peer belongs to peer group, clear up the
relationship. */
if (peer->group) {
@@ -3500,6 +3508,11 @@ int bgp_delete(struct bgp *bgp)
BGP_TIMER_OFF(gr_info->t_route_select);
}
+ /* Delete route flap dampening configuration */
+ FOREACH_AFI_SAFI (afi, safi) {
+ bgp_damp_disable(bgp, afi, safi);
+ }
+
if (BGP_DEBUG(zebra, ZEBRA)) {
if (bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)
zlog_debug("Deleting Default VRF");