diff options
author | Russ White <russ@riw.us> | 2021-10-27 21:29:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-27 21:29:39 +0200 |
commit | f727c6ae8a62be99bd5be5a191fbd7df455a35f0 (patch) | |
tree | 9e9bde7f79993485caf03678351041c05379a81e /bgpd | |
parent | Merge pull request #9902 from LabNConsulting/working/lb/lutil-wait-optimization (diff) | |
parent | lib: make if_lookup_by_name_all_vrf internal (diff) | |
download | frr-f727c6ae8a62be99bd5be5a191fbd7df455a35f0.tar.xz frr-f727c6ae8a62be99bd5be5a191fbd7df455a35f0.zip |
Merge pull request #9837 from idryzhov/cleanup-if-by-name-vrf-all
*: fix usage of if_lookup_by_name_all_vrf
Diffstat (limited to 'bgpd')
-rw-r--r-- | bgpd/bgp_routemap.c | 4 | ||||
-rw-r--r-- | bgpd/bgp_zebra.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index 72a620aa6..d7c56dd83 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -1688,10 +1688,10 @@ route_match_interface(void *rule, const struct prefix *prefix, void *object) path = object; - if (!path) + if (!path || !path->peer || !path->peer->bgp) return RMAP_NOMATCH; - ifp = if_lookup_by_name_all_vrf((char *)rule); + ifp = if_lookup_by_name((char *)rule, path->peer->bgp->vrf_id); if (ifp == NULL || ifp->ifindex != path->attr->nh_ifindex) return RMAP_NOMATCH; diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 6c9eb2972..a98168d46 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -3547,7 +3547,7 @@ void bgp_zebra_announce_default(struct bgp *bgp, struct nexthop *nh, /* create default route with interface <VRF> * with nexthop-vrf <VRF> */ - ifp = if_lookup_by_name_all_vrf(vrf->name); + ifp = if_lookup_by_name_vrf(vrf->name, vrf); if (!ifp) return; api_nh->vrf_id = nh->vrf_id; |