mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 20:07:46 +00:00
Revert "bgpd: use common api in bgp_get"
This reverts commit bdaadb91e8
.
This commit is contained in:
parent
012baeeca6
commit
385069ca17
@ -48,6 +48,33 @@ FRR_CFG_DEFAULT_ULONG(BGP_KEEPALIVE,
|
||||
{ .val_ulong = 60 },
|
||||
);
|
||||
|
||||
|
||||
static int bgp_lookup_by_as_name_type(struct bgp **bgp_val, as_t *as,
|
||||
const char *name,
|
||||
enum bgp_instance_type inst_type)
|
||||
{
|
||||
struct bgp *bgp;
|
||||
|
||||
if (name)
|
||||
bgp = bgp_lookup_by_name(name);
|
||||
else
|
||||
bgp = bgp_get_default();
|
||||
|
||||
if (bgp) {
|
||||
if (bgp->as != *as) {
|
||||
*as = bgp->as;
|
||||
return BGP_ERR_INSTANCE_MISMATCH;
|
||||
}
|
||||
if (bgp->inst_type != inst_type)
|
||||
return BGP_ERR_INSTANCE_MISMATCH;
|
||||
*bgp_val = bgp;
|
||||
} else {
|
||||
*bgp_val = NULL;
|
||||
}
|
||||
|
||||
return BGP_SUCCESS;
|
||||
}
|
||||
|
||||
int routing_control_plane_protocols_name_validate(
|
||||
struct nb_cb_create_args *args)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user