diff options
Diffstat (limited to 'ospf6d/ospf6_route.h')
| -rw-r--r-- | ospf6d/ospf6_route.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/ospf6d/ospf6_route.h b/ospf6d/ospf6_route.h index bb5827a176..71a84a5c5d 100644 --- a/ospf6d/ospf6_route.h +++ b/ospf6d/ospf6_route.h @@ -297,6 +297,14 @@ extern const char *const ospf6_path_type_substr[OSPF6_PATH_TYPE_MAX]; && (ra)->path.origin.type == (rb)->path.origin.type \ && (ra)->path.origin.id == (rb)->path.origin.id \ && (ra)->path.origin.adv_router == (rb)->path.origin.adv_router) +#define ospf6_route_is_identical(ra, rb) \ + ((ra)->type == (rb)->type && \ + prefix_same(&(ra)->prefix, &(rb)->prefix) && \ + (ra)->path.type == (rb)->path.type && \ + (ra)->path.cost == (rb)->path.cost && \ + (ra)->path.u.cost_e2 == (rb)->path.u.cost_e2 && \ + listcount(ra->paths) == listcount(rb->paths) && \ + ospf6_route_cmp_nexthops(ra, rb)) #define ospf6_route_is_best(r) (CHECK_FLAG ((r)->flag, OSPF6_ROUTE_BEST)) @@ -322,8 +330,8 @@ extern void ospf6_add_nexthop(struct list *nh_list, int ifindex, struct in6_addr *addr); extern void ospf6_add_route_nexthop_blackhole(struct ospf6_route *route); extern int ospf6_num_nexthops(struct list *nh_list); -extern int ospf6_route_cmp_nexthops(struct ospf6_route *a, - struct ospf6_route *b); +extern bool ospf6_route_cmp_nexthops(struct ospf6_route *a, + struct ospf6_route *b); extern void ospf6_route_zebra_copy_nexthops(struct ospf6_route *route, struct zapi_nexthop nexthops[], int entries, vrf_id_t vrf_id); |
