afi = family2afi(rn->p.family);
if (rmap_name)
- ret = zebra_import_table_route_map_check(afi, re, re->instance,
- &rn->p,
+ ret = zebra_import_table_route_map_check(afi, re, &rn->p,
re->nhe->nhg.nexthop,
re->tag, rmap_name);
}
/* It'll get set if required inside */
- ret = zebra_route_map_check(family, re, re->instance, p, nexthop, zvrf,
- re->tag);
+ ret = zebra_route_map_check(family, re, p, nexthop, zvrf, re->tag);
if (ret == RMAP_DENYMATCH) {
if (IS_ZEBRA_DEBUG_RIB) {
zlog_debug(
struct zebra_rmap_obj {
struct nexthop *nexthop;
struct route_entry *re;
- uint8_t instance;
int metric;
route_tag_t tag;
};
if (!rm_data)
return RMAP_NOMATCH;
- return (rm_data->instance == *instance) ? RMAP_MATCH : RMAP_NOMATCH;
+ return (rm_data->re->instance == *instance) ? RMAP_MATCH : RMAP_NOMATCH;
}
static void *route_match_source_instance_compile(const char *arg)
route_map_finish();
}
-route_map_result_t
-zebra_route_map_check(afi_t family, struct route_entry *re, uint8_t instance,
- const struct prefix *p, struct nexthop *nexthop,
- struct zebra_vrf *zvrf, route_tag_t tag)
+route_map_result_t zebra_route_map_check(afi_t family, struct route_entry *re,
+ const struct prefix *p,
+ struct nexthop *nexthop,
+ struct zebra_vrf *zvrf, route_tag_t tag)
{
struct route_map *rmap = NULL;
char *rm_name;
rm_obj.nexthop = nexthop;
rm_obj.re = re;
- rm_obj.instance = instance;
rm_obj.metric = 0;
rm_obj.tag = tag;
XFREE(MTYPE_ROUTE_MAP_NAME, zebra_import_table_routemap[afi][table]);
}
-route_map_result_t
-zebra_import_table_route_map_check(int family, struct route_entry *re,
- uint8_t instance, const struct prefix *p,
- struct nexthop *nexthop, route_tag_t tag,
- const char *rmap_name)
+route_map_result_t zebra_import_table_route_map_check(
+ int family, struct route_entry *re, const struct prefix *p,
+ struct nexthop *nexthop, route_tag_t tag, const char *rmap_name)
{
struct route_map *rmap = NULL;
route_map_result_t ret = RMAP_DENYMATCH;
rm_obj.nexthop = nexthop;
rm_obj.re = re;
- rm_obj.instance = instance;
rm_obj.metric = 0;
rm_obj.tag = tag;
rm_obj.nexthop = nexthop;
rm_obj.re = re;
- rm_obj.instance = re->instance;
rm_obj.metric = re->metric;
rm_obj.tag = re->tag;
uint32_t table);
extern void zebra_del_import_table_route_map(afi_t afi, uint32_t table);
+extern route_map_result_t zebra_import_table_route_map_check(
+ int family, struct route_entry *re, const struct prefix *p,
+ struct nexthop *nexthop, route_tag_t tag, const char *rmap_name);
extern route_map_result_t
-zebra_import_table_route_map_check(int family, struct route_entry *re,
- uint8_t instance, const struct prefix *p,
- struct nexthop *nexthop, route_tag_t tag,
- const char *rmap_name);
-extern route_map_result_t
-zebra_route_map_check(afi_t family, struct route_entry *re, uint8_t instance,
+zebra_route_map_check(afi_t family, struct route_entry *re,
const struct prefix *p, struct nexthop *nexthop,
struct zebra_vrf *zvrf, route_tag_t tag);
extern route_map_result_t zebra_nht_route_map_check(afi_t afi, int client_proto,