forked from Mirror/frr
Merge pull request #16159 from opensourcerouting/fix/ignore_auto_created_vrf_bgp_instances
bgpd: Ignore auto created VRF BGP instances
This commit is contained in:
commit
2871a4e8cb
|
@ -3620,10 +3620,13 @@ struct bgp *bgp_lookup_by_name(const char *name)
|
|||
struct bgp *bgp;
|
||||
struct listnode *node, *nnode;
|
||||
|
||||
for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp))
|
||||
for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp)) {
|
||||
if (CHECK_FLAG(bgp->vrf_flags, BGP_VRF_AUTO))
|
||||
continue;
|
||||
if ((bgp->name == NULL && name == NULL)
|
||||
|| (bgp->name && name && strcmp(bgp->name, name) == 0))
|
||||
return bgp;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue