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.c | |
| 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.c')
| -rw-r--r-- | ospf6d/ospf6_route.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c index 35b567c768..92fcbf71e8 100644 --- a/ospf6d/ospf6_route.c +++ b/ospf6d/ospf6_route.c @@ -704,27 +704,6 @@ struct ospf6_route *ospf6_route_add(struct ospf6_route *route, } if (old) { - /* if route does not actually change, return unchanged */ - if (ospf6_route_is_identical(old, route)) { - if (IS_OSPF6_DEBUG_ROUTE(MEMORY)) - zlog_debug( - "%s %p: route add %p: needless update of %p old cost %u", - ospf6_route_table_name(table), - (void *)table, (void *)route, - (void *)old, old->path.cost); - else if (IS_OSPF6_DEBUG_ROUTE(TABLE)) - zlog_debug("%s: route add: needless update", - ospf6_route_table_name(table)); - - ospf6_route_delete(route); - SET_FLAG(old->flag, OSPF6_ROUTE_ADD); - ospf6_route_table_assert(table); - - /* to free the lookup lock */ - route_unlock_node(node); - return old; - } - if (IS_OSPF6_DEBUG_ROUTE(MEMORY)) zlog_debug( "%s %p: route add %p cost %u paths %u nh %u: update of %p cost %u paths %u nh %u", |
