From: Donatas Abraitis Date: Wed, 10 Jun 2020 07:09:01 +0000 (+0300) Subject: bgpd: Print dampening configuration per AF, not per neighbor X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=61a7d99f4011bdd5c4bd87f0f1473958f6a600bb;p=matthieu%2Ffrr.git bgpd: Print dampening configuration per AF, not per neighbor This caused duplicate `bgp dampening ...` to be printed per neighbor. Signed-off-by: Donatas Abraitis --- diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 4f5ba285aa..de5cfc8050 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -13470,11 +13470,6 @@ static void bgp_config_write_peer_af(struct vty *vty, struct bgp *bgp, vty_out(vty, "\n"); } - /* BGP flag dampening. */ - if (CHECK_FLAG(bgp->af_flags[afi][safi], - BGP_CONFIG_DAMPENING)) - bgp_config_write_damp(vty, afi, safi); - /* Route reflector client. */ if (peergroup_af_flag_check(peer, afi, safi, PEER_FLAG_REFLECTOR_CLIENT)) { @@ -13694,6 +13689,10 @@ static void bgp_config_write_family(struct vty *vty, struct bgp *bgp, afi_t afi, bgp_config_write_redistribute(vty, bgp, afi, safi); + /* BGP flag dampening. */ + if (CHECK_FLAG(bgp->af_flags[afi][safi], BGP_CONFIG_DAMPENING)) + bgp_config_write_damp(vty, afi, safi); + for (ALL_LIST_ELEMENTS(bgp->group, node, nnode, group)) bgp_config_write_peer_af(vty, bgp, group->conf, afi, safi);