]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: remove deprecated "bgp enforce-first-as" command
authorRenato Westphal <renato@opensourcerouting.org>
Tue, 21 May 2019 01:01:41 +0000 (22:01 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Tue, 21 May 2019 01:04:52 +0000 (22:04 -0300)
The one-year deprecation period has passed, remove it.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
bgpd/bgp_vty.c
bgpd/bgpd.c
bgpd/bgpd.h

index 880b8778069cacd397d4c0017bda1af17972acd1..2a08619ec34b0716b402217a622c439f401f5163 100644 (file)
@@ -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);
index c0f1f3184a8a0b202bfac773c08daddc8dd9cccc..2a7663f195cda2e445e66e457b1be0bc2d99853f 100644 (file)
@@ -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);
 
index b0f65675342d3d82896ea87f1bded9833e443592..c600d9f3f36d740ecda0e7f4d145b5e5e450e303 100644 (file)
@@ -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)