diff options
Diffstat (limited to 'ospf6d/ospf6_route.h')
| -rw-r--r-- | ospf6d/ospf6_route.h | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/ospf6d/ospf6_route.h b/ospf6d/ospf6_route.h index fd8b6a9c1d..633b8d77cd 100644 --- a/ospf6d/ospf6_route.h +++ b/ospf6d/ospf6_route.h @@ -291,20 +291,13 @@ extern const char *const ospf6_path_type_substr[OSPF6_PATH_TYPE_MAX]; #define OSPF6_ROUTE_PREFIX_STR "Display the route\n" #define OSPF6_ROUTE_MATCH_STR "Display the route matches the prefix\n" -#define ospf6_route_is_prefix(p, r) \ - (memcmp(p, &(r)->prefix, sizeof(struct prefix)) == 0) +#define ospf6_route_is_prefix(p, r) (prefix_same(p, &(r)->prefix)) #define ospf6_route_is_same(ra, rb) (prefix_same(&(ra)->prefix, &(rb)->prefix)) #define ospf6_route_is_same_origin(ra, rb) \ ((ra)->path.area_id == (rb)->path.area_id \ - && memcmp(&(ra)->path.origin, &(rb)->path.origin, \ - sizeof(struct ospf6_ls_origin)) \ - == 0) -#define ospf6_route_is_identical(ra, rb) \ - ((ra)->type == (rb)->type \ - && memcmp(&(ra)->prefix, &(rb)->prefix, sizeof(struct prefix)) == 0 \ - && memcmp(&(ra)->path, &(rb)->path, sizeof(struct ospf6_path)) == 0 \ - && listcount(ra->paths) == listcount(rb->paths) \ - && ospf6_route_cmp_nexthops(ra, rb) == 0) + && (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_best(r) (CHECK_FLAG ((r)->flag, OSPF6_ROUTE_BEST)) |
