]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: BGP_ERR_MULTIPLE_INSTANCE_NOT_SET is an impossible condition
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 18 Jun 2019 13:21:49 +0000 (09:21 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 18 Jun 2019 13:26:00 +0000 (09:26 -0400)
This code is not returned anywhere in the system as that bgp
is by default multiple-instance 'only' now.  So remove
the last remaining bits of it from the code base.

Remove BGP_ERR_MULTIPLE_INSTANCE_USED too.

Make bgp_get explicitly return BGP_SUCCESS
instead of 0.

Remove the multi-instance error code too.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgp_errors.c
bgpd/bgp_errors.h
bgpd/bgp_evpn.c
bgpd/bgp_vty.c
bgpd/bgpd.c
bgpd/bgpd.h

index 6e181697d64c07bf6da7cee88f00ae1678ef2051..d9aba87e35ceda8d0f37eeb4f5738a6437f8ccc7 100644 (file)
@@ -426,12 +426,6 @@ static struct log_ref ferr_bgp_err[] = {
                .description = "BGP attempted to create an EVPN ES entry and failed",
                .suggestion = "Most likely a bug. If the problem persists, report the problem for troubleshooting"
        },
-       {
-               .code = EC_BGP_MULTI_INSTANCE,
-               .title = "BGP config multi-instance issue",
-               .description = "BGP configuration attempting multiple instances without enabling the feature",
-               .suggestion = "Correct the configuration so that bgp multiple-instance is enabled if desired"
-       },
        {
                .code = EC_BGP_EVPN_AS_MISMATCH,
                .title = "BGP AS configuration issue",
index 39d043ff13c43662dde54ce999132bcc8fa748df..35c5cc3998eabdb30e57fc69ec13f2f568ec4e3a 100644 (file)
@@ -67,7 +67,6 @@ enum bgp_log_refs {
        EC_BGP_EVPN_ROUTE_INVALID,
        EC_BGP_EVPN_ROUTE_CREATE,
        EC_BGP_ES_CREATE,
-       EC_BGP_MULTI_INSTANCE,
        EC_BGP_EVPN_AS_MISMATCH,
        EC_BGP_EVPN_INSTANCE_MISMATCH,
        EC_BGP_FLOWSPEC_PACKET,
index c4b2a606c58e96d260766607ef06c982f6c4bf1f..94022ec1bed933540afaaa08f59b17f5405ed080 100644 (file)
@@ -5533,10 +5533,6 @@ int bgp_evpn_local_l3vni_add(vni_t l3vni, vrf_id_t vrf_id, struct ethaddr *rmac,
                              vrf_id == VRF_DEFAULT ? BGP_INSTANCE_TYPE_DEFAULT
                                                    : BGP_INSTANCE_TYPE_VRF);
                switch (ret) {
-               case BGP_ERR_MULTIPLE_INSTANCE_NOT_SET:
-                       flog_err(EC_BGP_MULTI_INSTANCE,
-                                "'bgp multiple-instance' not present\n");
-                       return -1;
                case BGP_ERR_AS_MISMATCH:
                        flog_err(EC_BGP_EVPN_AS_MISMATCH,
                                 "BGP is already running; AS is %u\n", as);
index a18a3bb952e69e96d2e0c059b6887f8984ddf11e..6cbb9af50eeb59d865c50a9174af8894eae92905 100644 (file)
@@ -979,10 +979,6 @@ DEFUN_NOSH (router_bgp,
 
                ret = bgp_get(&bgp, &as, name, inst_type);
                switch (ret) {
-               case BGP_ERR_MULTIPLE_INSTANCE_NOT_SET:
-                       vty_out(vty,
-                               "Please specify 'bgp multiple-instance' first\n");
-                       return CMD_WARNING_CONFIG_FAILED;
                case BGP_ERR_AS_MISMATCH:
                        vty_out(vty, "BGP is already running; AS is %u\n", as);
                        return CMD_WARNING_CONFIG_FAILED;
index af90e9841a2e04f3b00a490fde113e3bfb3bde28..3ca209676f276e170e2513801dd0d45f97ec6e39 100644 (file)
@@ -3183,7 +3183,7 @@ int bgp_get(struct bgp **bgp_val, as_t *as, const char *name,
                if (bgp->inst_type != inst_type)
                        return BGP_ERR_INSTANCE_MISMATCH;
                *bgp_val = bgp;
-               return 0;
+               return BGP_SUCCESS;
        }
 
        bgp = bgp_create(as, name, inst_type);
@@ -3217,7 +3217,7 @@ int bgp_get(struct bgp **bgp_val, as_t *as, const char *name,
                bgp_zebra_instance_register(bgp);
        }
 
-       return 0;
+       return BGP_SUCCESS;
 }
 
 /*
index 088c6411b4729a98a8500e09602d9b56c376efe7..4bce73898f4991b384b9e873f36aab12939d92ec 100644 (file)
@@ -1453,12 +1453,10 @@ enum bgp_clear_type {
 #define BGP_ERR_INVALID_AS                       -3
 #define BGP_ERR_INVALID_BGP                      -4
 #define BGP_ERR_PEER_GROUP_MEMBER                -5
-#define BGP_ERR_MULTIPLE_INSTANCE_USED           -6
 #define BGP_ERR_PEER_GROUP_NO_REMOTE_AS          -7
 #define BGP_ERR_PEER_GROUP_CANT_CHANGE           -8
 #define BGP_ERR_PEER_GROUP_MISMATCH              -9
 #define BGP_ERR_PEER_GROUP_PEER_TYPE_DIFFERENT  -10
-#define BGP_ERR_MULTIPLE_INSTANCE_NOT_SET       -11
 #define BGP_ERR_AS_MISMATCH                     -12
 #define BGP_ERR_PEER_FLAG_CONFLICT              -13
 #define BGP_ERR_PEER_GROUP_SHUTDOWN             -14