diff --git a/ospfd/ospf_asbr.c b/ospfd/ospf_asbr.c index 53d2ec538c..982fad63ec 100644 --- a/ospfd/ospf_asbr.c +++ b/ospfd/ospf_asbr.c @@ -72,12 +72,13 @@ void ospf_external_route_remove(struct ospf *ospf, struct prefix_ipv4 *p) } /* Add an External info for AS-external-LSA. */ -struct external_info *ospf_external_info_new(uint8_t type, +struct external_info *ospf_external_info_new(struct ospf *ospf, uint8_t type, unsigned short instance) { struct external_info *new; new = XCALLOC(MTYPE_OSPF_EXTERNAL_INFO, sizeof(struct external_info)); + new->ospf = ospf; new->type = type; new->instance = instance; new->to_be_processed = 0; @@ -138,7 +139,7 @@ ospf_external_info_add(struct ospf *ospf, uint8_t type, unsigned short instance, } /* Create new External info instance. */ - new = ospf_external_info_new(type, instance); + new = ospf_external_info_new(ospf, type, instance); new->p = p; new->ifindex = ifindex; new->nexthop = nexthop; diff --git a/ospfd/ospf_asbr.h b/ospfd/ospf_asbr.h index d3e50903ef..160883144f 100644 --- a/ospfd/ospf_asbr.h +++ b/ospfd/ospf_asbr.h @@ -29,6 +29,8 @@ struct route_map_set_values { /* Redistributed external information. */ struct external_info { + struct ospf *ospf; + /* Type of source protocol. */ uint8_t type; @@ -107,7 +109,8 @@ struct ospf_external_aggr_rt { #define OSPF_ASBR_NSSA_REDIST_UPDATE_DELAY 9 extern void ospf_external_route_remove(struct ospf *, struct prefix_ipv4 *); -extern struct external_info *ospf_external_info_new(uint8_t, unsigned short); +extern struct external_info *ospf_external_info_new(struct ospf *, uint8_t, + unsigned short); extern void ospf_reset_route_map_set_values(struct route_map_set_values *); extern int ospf_route_map_set_compare(struct route_map_set_values *, struct route_map_set_values *); diff --git a/ospfd/ospf_routemap.c b/ospfd/ospf_routemap.c index 2525c1cf3a..b1216626c4 100644 --- a/ospfd/ospf_routemap.c +++ b/ospfd/ospf_routemap.c @@ -320,7 +320,7 @@ route_match_interface(void *rule, const struct prefix *prefix, void *object) struct external_info *ei; ei = object; - ifp = if_lookup_by_name_all_vrf((char *)rule); + ifp = if_lookup_by_name((char *)rule, ei->ospf->vrf_id); if (ifp == NULL || ifp->ifindex != ei->ifindex) return RMAP_NOMATCH;