]> git.puffer.fish Git - mirror/frr.git/commitdiff
Revert "bgpd: fix duplicate BGP instance created with unified config"
authorDonatas Abraitis <donatas@opensourcerouting.org>
Thu, 6 Feb 2025 09:09:25 +0000 (11:09 +0200)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Thu, 6 Feb 2025 09:09:25 +0000 (11:09 +0200)
This reverts commit 3abd84ef5be1ef56b66f0e7617f8afab6da6c5cc.

bgpd/bgpd.c

index 17a34dbacb3e0a7d25017cb2b1c3509d3dc8633d..a984c5af877a0ba4afbc2607a406ec55860c83cd 100644 (file)
@@ -3623,13 +3623,13 @@ struct bgp *bgp_lookup(as_t as, const char *name)
 }
 
 /* Lookup BGP structure by view name. */
-struct bgp *bgp_lookup_by_name_filter(const char *name, bool filter_auto)
+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)) {
-               if (filter_auto && CHECK_FLAG(bgp->vrf_flags, BGP_VRF_AUTO))
+               if (CHECK_FLAG(bgp->vrf_flags, BGP_VRF_AUTO))
                        continue;
                if ((bgp->name == NULL && name == NULL)
                    || (bgp->name && name && strcmp(bgp->name, name) == 0))
@@ -3638,11 +3638,6 @@ struct bgp *bgp_lookup_by_name_filter(const char *name, bool filter_auto)
        return NULL;
 }
 
-struct bgp *bgp_lookup_by_name(const char *name)
-{
-       return bgp_lookup_by_name_filter(name, true);
-}
-
 /* Lookup BGP instance based on VRF id. */
 /* Note: Only to be used for incoming messages from Zebra. */
 struct bgp *bgp_lookup_by_vrf_id(vrf_id_t vrf_id)