mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-06-05 23:49:42 +00:00
Reapply "bgpd: fix bgp vrf instance creation from implicit"
This reverts commit d9d74d33bc
.
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
This commit is contained in:
parent
21ffe63d1d
commit
bc6c7f60dc
23
bgpd/bgpd.c
23
bgpd/bgpd.c
@ -3410,17 +3410,6 @@ static struct bgp *bgp_create(as_t *as, const char *name,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bgp = XCALLOC(MTYPE_BGP, sizeof(struct bgp));
|
bgp = XCALLOC(MTYPE_BGP, sizeof(struct bgp));
|
||||||
bgp->as = *as;
|
|
||||||
if (as_pretty)
|
|
||||||
bgp->as_pretty = XSTRDUP(MTYPE_BGP_NAME, as_pretty);
|
|
||||||
else
|
|
||||||
bgp->as_pretty = XSTRDUP(MTYPE_BGP_NAME, asn_asn2asplain(*as));
|
|
||||||
|
|
||||||
if (asnotation != ASNOTATION_UNDEFINED) {
|
|
||||||
bgp->asnotation = asnotation;
|
|
||||||
SET_FLAG(bgp->config, BGP_CONFIG_ASNOTATION);
|
|
||||||
} else
|
|
||||||
asn_str2asn_notation(bgp->as_pretty, NULL, &bgp->asnotation);
|
|
||||||
|
|
||||||
if (BGP_DEBUG(zebra, ZEBRA)) {
|
if (BGP_DEBUG(zebra, ZEBRA)) {
|
||||||
if (inst_type == BGP_INSTANCE_TYPE_DEFAULT)
|
if (inst_type == BGP_INSTANCE_TYPE_DEFAULT)
|
||||||
@ -3464,6 +3453,18 @@ static struct bgp *bgp_create(as_t *as, const char *name,
|
|||||||
bgp->peer = list_new();
|
bgp->peer = list_new();
|
||||||
|
|
||||||
peer_init:
|
peer_init:
|
||||||
|
bgp->as = *as;
|
||||||
|
if (as_pretty)
|
||||||
|
bgp->as_pretty = XSTRDUP(MTYPE_BGP_NAME, as_pretty);
|
||||||
|
else
|
||||||
|
bgp->as_pretty = XSTRDUP(MTYPE_BGP_NAME, asn_asn2asplain(*as));
|
||||||
|
|
||||||
|
if (asnotation != ASNOTATION_UNDEFINED) {
|
||||||
|
bgp->asnotation = asnotation;
|
||||||
|
SET_FLAG(bgp->config, BGP_CONFIG_ASNOTATION);
|
||||||
|
} else
|
||||||
|
asn_str2asn_notation(bgp->as_pretty, NULL, &bgp->asnotation);
|
||||||
|
|
||||||
bgp->peer->cmp = (int (*)(void *, void *))peer_cmp;
|
bgp->peer->cmp = (int (*)(void *, void *))peer_cmp;
|
||||||
bgp->peerhash = hash_create(peer_hash_key_make, peer_hash_same,
|
bgp->peerhash = hash_create(peer_hash_key_make, peer_hash_same,
|
||||||
"BGP Peer Hash");
|
"BGP Peer Hash");
|
||||||
|
Loading…
Reference in New Issue
Block a user