Merge pull request #6553 from ton31337/fix/bgp_dampening_vty_bug_7.4

bgpd: [7.4] Duplicate `bgp dampening ...` stuff
This commit is contained in:
Donald Sharp 2020-06-10 11:08:03 -04:00 committed by GitHub
commit b286cd18e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 7 deletions

View File

@ -13513,14 +13513,21 @@ void bgp_route_init(void)
install_element(BGP_IPV6M_NODE, install_element(BGP_IPV6M_NODE,
&no_ipv6_bgp_distance_source_access_list_cmd); &no_ipv6_bgp_distance_source_access_list_cmd);
/* BGP dampening */
install_element(BGP_NODE, &bgp_damp_set_cmd); install_element(BGP_NODE, &bgp_damp_set_cmd);
install_element(BGP_NODE, &bgp_damp_unset_cmd); install_element(BGP_NODE, &bgp_damp_unset_cmd);
install_element(BGP_IPV4_NODE, &bgp_damp_set_cmd); install_element(BGP_IPV4_NODE, &bgp_damp_set_cmd);
install_element(BGP_IPV4_NODE, &bgp_damp_unset_cmd); install_element(BGP_IPV4_NODE, &bgp_damp_unset_cmd);
/* IPv4 Multicast Mode */
install_element(BGP_IPV4M_NODE, &bgp_damp_set_cmd); install_element(BGP_IPV4M_NODE, &bgp_damp_set_cmd);
install_element(BGP_IPV4M_NODE, &bgp_damp_unset_cmd); install_element(BGP_IPV4M_NODE, &bgp_damp_unset_cmd);
install_element(BGP_IPV4L_NODE, &bgp_damp_set_cmd);
install_element(BGP_IPV4L_NODE, &bgp_damp_unset_cmd);
install_element(BGP_IPV6_NODE, &bgp_damp_set_cmd);
install_element(BGP_IPV6_NODE, &bgp_damp_unset_cmd);
install_element(BGP_IPV6M_NODE, &bgp_damp_set_cmd);
install_element(BGP_IPV6M_NODE, &bgp_damp_unset_cmd);
install_element(BGP_IPV6L_NODE, &bgp_damp_set_cmd);
install_element(BGP_IPV6L_NODE, &bgp_damp_unset_cmd);
/* Large Communities */ /* Large Communities */
install_element(VIEW_NODE, &show_ip_bgp_large_community_list_cmd); install_element(VIEW_NODE, &show_ip_bgp_large_community_list_cmd);

View File

@ -14815,11 +14815,6 @@ static void bgp_config_write_peer_af(struct vty *vty, struct bgp *bgp,
vty_out(vty, "\n"); 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. */ /* Route reflector client. */
if (peergroup_af_flag_check(peer, afi, safi, if (peergroup_af_flag_check(peer, afi, safi,
PEER_FLAG_REFLECTOR_CLIENT)) { PEER_FLAG_REFLECTOR_CLIENT)) {
@ -15044,6 +15039,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_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)) for (ALL_LIST_ELEMENTS(bgp->group, node, nnode, group))
bgp_config_write_peer_af(vty, bgp, group->conf, afi, safi); bgp_config_write_peer_af(vty, bgp, group->conf, afi, safi);