From f153b9a9b636e7ca16ef066e934d355ba922df2b Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Tue, 4 Jun 2024 15:30:27 +0300 Subject: bgpd: Ignore auto created VRF BGP instances Configuration: ``` vtysh < --- bgpd/bgpd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bgpd/bgpd.c') diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index d8eba0ab2..5c7953508 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -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; } -- cgit v1.2.3