mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 09:22:32 +00:00
Revert "bgpd: fix crash when as/type mismatches in config"
This reverts commit 0d6d0208a5
.
This commit is contained in:
parent
30aaf9820d
commit
748eeb756a
@ -111,24 +111,15 @@ int bgp_router_create(struct nb_cb_create_args *args)
|
|||||||
is_new_bgp = (bgp_lookup_by_name(name) == NULL);
|
is_new_bgp = (bgp_lookup_by_name(name) == NULL);
|
||||||
|
|
||||||
ret = bgp_get_vty(&bgp, &as, name, inst_type);
|
ret = bgp_get_vty(&bgp, &as, name, inst_type);
|
||||||
if (ret) {
|
switch (ret) {
|
||||||
switch (ret) {
|
case BGP_ERR_AS_MISMATCH:
|
||||||
case BGP_ERR_AS_MISMATCH:
|
snprintf(args->errmsg, args->errmsg_len,
|
||||||
snprintf(
|
"BGP instance is already running; AS is %u",
|
||||||
args->errmsg, args->errmsg_len,
|
as);
|
||||||
"BGP instance is already running; AS is %u",
|
return NB_ERR_INCONSISTENCY;
|
||||||
as);
|
case BGP_ERR_INSTANCE_MISMATCH:
|
||||||
break;
|
snprintf(args->errmsg, args->errmsg_len,
|
||||||
case BGP_ERR_INSTANCE_MISMATCH:
|
"BGP instance type mismatch");
|
||||||
snprintf(args->errmsg, args->errmsg_len,
|
|
||||||
"BGP instance type mismatch");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
UNSET_FLAG(bgp->vrf_flags, BGP_VRF_AUTO);
|
|
||||||
|
|
||||||
nb_running_set_entry(args->dnode, bgp);
|
|
||||||
|
|
||||||
return NB_ERR_INCONSISTENCY;
|
return NB_ERR_INCONSISTENCY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user