Skip to content

Commit

Permalink
Merge pull request #18036 from opensourcerouting/fix/stabilize_10.1_a…
Browse files Browse the repository at this point in the history
…gain

Stabilize 10.1 branch
  • Loading branch information
riw777 authored Feb 7, 2025
2 parents a61d808 + b5caf08 commit 0245b8e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bgpd/bgp_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ static int bgp_vrf_disable(struct vrf *vrf)
if (BGP_DEBUG(zebra, ZEBRA))
zlog_debug("VRF disable %s id %d", vrf->name, vrf->vrf_id);

bgp = bgp_lookup_by_name_filter(vrf->name, false);
bgp = bgp_lookup_by_name(vrf->name);
if (bgp) {

vpn_leak_zebra_vrf_label_withdraw(bgp, AFI_IP);
Expand Down
2 changes: 1 addition & 1 deletion bgpd/bgp_vty.c
Original file line number Diff line number Diff line change
Expand Up @@ -10440,7 +10440,7 @@ DEFPY(bgp_imexport_vrf, bgp_imexport_vrf_cmd,
}
}

vrf_bgp = bgp_lookup_by_name_filter(import_name, false);
vrf_bgp = bgp_lookup_by_name(import_name);
if (!vrf_bgp) {
if (strcmp(import_name, VRF_DEFAULT_NAME) == 0) {
vrf_bgp = bgp_default;
Expand Down
9 changes: 2 additions & 7 deletions bgpd/bgpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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)
Expand Down
1 change: 0 additions & 1 deletion bgpd/bgpd.h
Original file line number Diff line number Diff line change
Expand Up @@ -2225,7 +2225,6 @@ extern void bgp_zclient_reset(void);
extern struct bgp *bgp_get_default(void);
extern struct bgp *bgp_lookup(as_t, const char *);
extern struct bgp *bgp_lookup_by_name(const char *);
extern struct bgp *bgp_lookup_by_name_filter(const char *name, bool filter_auto);
extern struct bgp *bgp_lookup_by_vrf_id(vrf_id_t);
extern struct bgp *bgp_get_evpn(void);
extern void bgp_set_evpn(struct bgp *bgp);
Expand Down

0 comments on commit 0245b8e

Please sign in to comment.