Skip to content

Commit

Permalink
Merge pull request #16159 from opensourcerouting/fix/ignore_auto_crea…
Browse files Browse the repository at this point in the history
…ted_vrf_bgp_instances

bgpd: Ignore auto created VRF BGP instances
  • Loading branch information
donaldsharp authored Jun 5, 2024
2 parents 36bb593 + f153b9a commit 2871a4e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bgpd/bgpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 2871a4e

Please sign in to comment.