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,
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);
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;
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);
#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)