The zebra_rmap_obj was storing the re->metric and allowing
matches against it, but in most cases it was just using 0.
Use the Route entries metric instead. This should fix
some bugs where a match metric never worked.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
struct zebra_rmap_obj {
struct nexthop *nexthop;
struct route_entry *re;
- int metric;
route_tag_t tag;
};
rm_obj.nexthop = nexthop;
rm_obj.re = re;
- rm_obj.metric = 0;
rm_obj.tag = tag;
if (re->type >= 0 && re->type < ZEBRA_ROUTE_MAX) {
rm_obj.nexthop = nexthop;
rm_obj.re = re;
- rm_obj.metric = 0;
rm_obj.tag = tag;
if (re->type >= 0 && re->type < ZEBRA_ROUTE_MAX)
rm_obj.nexthop = nexthop;
rm_obj.re = re;
- rm_obj.metric = re->metric;
rm_obj.tag = re->tag;
if (client_proto >= 0 && client_proto < ZEBRA_ROUTE_MAX)