diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2021-11-15 19:27:27 +0300 |
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-11-15 19:27:27 +0300 |
| commit | 8f359e1593c41432273458b0c7bfd7cd27b47d45 (patch) | |
| tree | d6872f6b3bb25993aafe0c0b9a5bdf87e8ce822b /ospf6d/ospf6_route.h | |
| parent | de48804c01e077a54b4a46221c433c33abc4e334 (diff) | |
ospf6d: remove meaningless ospf6_route_is_identical
As part of the check, it memcompares two structs ospf6_path. This struct
has a pointer field nh_list which is allocated every time a new path is
created, which means it can never be the same for two different paths.
Therefore this check is always false and can be completely removed.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'ospf6d/ospf6_route.h')
| -rw-r--r-- | ospf6d/ospf6_route.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/ospf6d/ospf6_route.h b/ospf6d/ospf6_route.h index fd8b6a9c1d..8be65fa349 100644 --- a/ospf6d/ospf6_route.h +++ b/ospf6d/ospf6_route.h @@ -299,12 +299,6 @@ extern const char *const ospf6_path_type_substr[OSPF6_PATH_TYPE_MAX]; && 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) #define ospf6_route_is_best(r) (CHECK_FLAG ((r)->flag, OSPF6_ROUTE_BEST)) |
