ospf6d: don't use if_lookup_by_name_all_vrf

if_lookup_by_name_all_vrf doesn't work correctly with netns VRF backend
as the same index may be used in multiple netns simultaneously.

Use the appropriate VRF when looking for the interface.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
This commit is contained in:
Igor Ryzhov 2021-10-14 21:06:38 +03:00
parent 31eab818f6
commit 198ef12aef

View File

@ -2042,10 +2042,12 @@ ospf6_routemap_rule_match_interface(void *rule, const struct prefix *prefix,
void *object)
{
struct interface *ifp;
struct ospf6_route *route;
struct ospf6_external_info *ei;
ei = ((struct ospf6_route *)object)->route_option;
ifp = if_lookup_by_name_all_vrf((char *)rule);
route = object;
ei = route->route_option;
ifp = if_lookup_by_name((char *)rule, route->ospf6->vrf_id);
if (ifp != NULL && ei->ifindex == ifp->ifindex)
return RMAP_MATCH;