mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-02 20:36:01 +00:00
bgpd: remove deprecated "bgp enforce-first-as" command
The one-year deprecation period has passed, remove it. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
This commit is contained in:
parent
a6002ca584
commit
6982ab8f68
@ -2143,28 +2143,6 @@ DEFUN (no_bgp_fast_external_failover,
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
/* "bgp enforce-first-as" configuration. */
|
||||
#if CONFDATE > 20190517
|
||||
CPP_NOTICE("bgpd: remove deprecated '[no] bgp enforce-first-as' commands")
|
||||
#endif
|
||||
|
||||
DEFUN_HIDDEN (bgp_enforce_first_as,
|
||||
bgp_enforce_first_as_cmd,
|
||||
"[no] bgp enforce-first-as",
|
||||
NO_STR
|
||||
BGP_STR
|
||||
"Enforce the first AS for EBGP routes\n")
|
||||
{
|
||||
VTY_DECLVAR_CONTEXT(bgp, bgp);
|
||||
|
||||
if (strmatch(argv[0]->text, "no"))
|
||||
bgp_flag_unset(bgp, BGP_FLAG_ENFORCE_FIRST_AS);
|
||||
else
|
||||
bgp_flag_set(bgp, BGP_FLAG_ENFORCE_FIRST_AS);
|
||||
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
/* "bgp bestpath compare-routerid" configuration. */
|
||||
DEFUN (bgp_bestpath_compare_router_id,
|
||||
bgp_bestpath_compare_router_id_cmd,
|
||||
@ -13036,9 +13014,6 @@ void bgp_vty_init(void)
|
||||
install_element(BGP_NODE, &bgp_fast_external_failover_cmd);
|
||||
install_element(BGP_NODE, &no_bgp_fast_external_failover_cmd);
|
||||
|
||||
/* "bgp enforce-first-as" commands */
|
||||
install_element(BGP_NODE, &bgp_enforce_first_as_cmd);
|
||||
|
||||
/* "bgp bestpath compare-routerid" commands */
|
||||
install_element(BGP_NODE, &bgp_bestpath_compare_router_id_cmd);
|
||||
install_element(BGP_NODE, &no_bgp_bestpath_compare_router_id_cmd);
|
||||
|
15
bgpd/bgpd.c
15
bgpd/bgpd.c
@ -7557,12 +7557,6 @@ static void bgp_config_write_family(struct vty *vty, struct bgp *bgp, afi_t afi,
|
||||
vty_endframe(vty, " exit-address-family\n");
|
||||
}
|
||||
|
||||
/* clang-format off */
|
||||
#if CONFDATE > 20190517
|
||||
CPP_NOTICE("bgpd: remove 'bgp enforce-first-as' config migration from bgp_config_write")
|
||||
#endif
|
||||
/* clang-format on */
|
||||
|
||||
int bgp_config_write(struct vty *vty)
|
||||
{
|
||||
int write = 0;
|
||||
@ -7598,15 +7592,6 @@ int bgp_config_write(struct vty *vty)
|
||||
if (CHECK_FLAG(bgp->vrf_flags, BGP_VRF_AUTO))
|
||||
continue;
|
||||
|
||||
/* Migrate deprecated 'bgp enforce-first-as'
|
||||
* config to 'neighbor * enforce-first-as' configs
|
||||
*/
|
||||
if (bgp_flag_check(bgp, BGP_FLAG_ENFORCE_FIRST_AS)) {
|
||||
for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer))
|
||||
peer_flag_set(peer, PEER_FLAG_ENFORCE_FIRST_AS);
|
||||
bgp_flag_unset(bgp, BGP_FLAG_ENFORCE_FIRST_AS);
|
||||
}
|
||||
|
||||
/* Router bgp ASN */
|
||||
vty_out(vty, "router bgp %u", bgp->as);
|
||||
|
||||
|
@ -348,7 +348,6 @@ struct bgp {
|
||||
#define BGP_FLAG_MED_CONFED (1 << 3)
|
||||
#define BGP_FLAG_NO_DEFAULT_IPV4 (1 << 4)
|
||||
#define BGP_FLAG_NO_CLIENT_TO_CLIENT (1 << 5)
|
||||
#define BGP_FLAG_ENFORCE_FIRST_AS (1 << 6)
|
||||
#define BGP_FLAG_COMPARE_ROUTER_ID (1 << 7)
|
||||
#define BGP_FLAG_ASPATH_IGNORE (1 << 8)
|
||||
#define BGP_FLAG_IMPORT_CHECK (1 << 9)
|
||||
|
Loading…
Reference in New Issue
Block a user