forked from Mirror/frr
bgpd: BGP_ERR_MULTIPLE_INSTANCE_NOT_SET is an impossible condition
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>
This commit is contained in:
parent
cd4ee3395c
commit
d5568431f7
|
@ -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",
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue