Revert "bgpd: Consolidate dampening show run output with the rest of that code"

This reverts commit 39d8dd2d17.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
This commit is contained in:
Igor Ryzhov 2021-08-02 13:42:56 +03:00
parent a5c1e10386
commit 75caa18cef

View File

@ -17756,9 +17756,6 @@ static void bgp_config_write_peer_af(struct vty *vty, struct bgp *bgp,
: "");
}
}
if (peer_af_flag_check(peer, afi, safi, PEER_FLAG_CONFIG_DAMPENING))
bgp_config_write_peer_damp(vty, peer, afi, safi);
}
/* Address family based peer configuration display. */
@ -17812,6 +17809,15 @@ static void bgp_config_write_family(struct vty *vty, struct bgp *bgp, afi_t afi,
/* BGP flag dampening. */
if (CHECK_FLAG(bgp->af_flags[afi][safi], BGP_CONFIG_DAMPENING))
bgp_config_write_damp(vty, bgp, afi, safi);
for (ALL_LIST_ELEMENTS_RO(bgp->group, node, group))
if (peer_af_flag_check(group->conf, afi, safi,
PEER_FLAG_CONFIG_DAMPENING))
bgp_config_write_peer_damp(vty, group->conf, afi, safi);
for (ALL_LIST_ELEMENTS_RO(bgp->peer, node, peer))
if (CHECK_FLAG(peer->flags, PEER_FLAG_CONFIG_NODE)
&& peer_af_flag_check(peer, afi, safi,
PEER_FLAG_CONFIG_DAMPENING))
bgp_config_write_peer_damp(vty, peer, afi, safi);
for (ALL_LIST_ELEMENTS(bgp->group, node, nnode, group))
bgp_config_write_peer_af(vty, bgp, group->conf, afi, safi);