removal of some of the deadcode in ospf6d.
Signed-off-by: Manoj Naragund <mnaragund@vmware.com>
unsigned char conf_debug_ospf6_abr;
-int ospf6_ls_origin_cmp(struct ospf6_path *o_path, struct ospf6_route *route)
+int ospf6_ls_origin_same(struct ospf6_path *o_path, struct ospf6_path *r_path)
{
- if (((o_path->origin.type == route->path.origin.type)
- && (o_path->origin.id == route->path.origin.id)
- && (o_path->origin.adv_router ==
- route->path.origin.adv_router)))
+ if (((o_path->origin.type == r_path->origin.type)
+ && (o_path->origin.id == r_path->origin.id)
+ && (o_path->origin.adv_router == r_path->origin.adv_router)))
return 1;
else
return 0;
struct ospf6_nexthop *nh, *rnh;
for (ALL_LIST_ELEMENTS(old_route->paths, anode, anext, o_path)) {
- if (o_path->area_id != route->path.area_id ||
- (!ospf6_ls_origin_cmp(o_path, route)))
+ if (o_path->area_id != route->path.area_id
+ || !ospf6_ls_origin_same(o_path, &route->path))
continue;
if ((o_path->cost == route->path.cost) &&
for (ALL_LIST_ELEMENTS_RO(old_route->paths, anode,
o_path)) {
- if (o_path->area_id == route->path.area_id &&
- (ospf6_ls_origin_cmp(o_path, route)))
+ if (o_path->area_id == route->path.area_id
+ && ospf6_ls_origin_same(o_path, &route->path))
break;
}
extern void ospf6_abr_range_update(struct ospf6_route *range,
struct ospf6 *ospf6);
extern void ospf6_abr_remove_unapproved_summaries(struct ospf6 *ospf6);
-extern int ospf6_ls_origin_cmp(struct ospf6_path *o_path,
- struct ospf6_route *route);
+extern int ospf6_ls_origin_same(struct ospf6_path *o_path,
+ struct ospf6_path *r_path);
#endif /*OSPF6_ABR_H*/
* origin.
*/
if (o_path->area_id != route->path.area_id
- || (!ospf6_ls_origin_cmp(o_path, route)))
+ || !ospf6_ls_origin_same(o_path, &route->path))
continue;
/* Cost is not same then delete current path */
for (ALL_LIST_ELEMENTS_RO(old_route->paths, anode,
o_path)) {
if (o_path->area_id == route->path.area_id
- && (ospf6_ls_origin_cmp(o_path, route)))
+ && ospf6_ls_origin_same(o_path, &route->path))
break;
}
/* If path is not found in old_route paths's list,
ospf6_lsa_delete(new);
return;
}
- return;
}
}
/* Check old route path and route has same
* origin.
*/
- if (o_path->area_id != route->path.area_id ||
- (!ospf6_ls_origin_cmp(o_path, route)))
+ if (o_path->area_id != route->path.area_id
+ || !ospf6_ls_origin_same(o_path, &route->path))
continue;
/* Cost is not same then delete current path */
*/
for (ALL_LIST_ELEMENTS_RO(old_route->paths, anode,
o_path)) {
- if (o_path->area_id == route->path.area_id &&
- (ospf6_ls_origin_cmp(o_path, route)))
+ if (o_path->area_id == route->path.area_id
+ && ospf6_ls_origin_same(o_path, &route->path))
break;
}
/* If path is not found in old_route paths's list,
zlog_debug("Ignoring LSA of reserved scope");
ospf6_lsa_delete(his);
continue;
- break;
}
if (ntohs(his->header->type) == OSPF6_LSTYPE_AS_EXTERNAL
zlog_debug("Ignoring LSA of reserved scope");
ospf6_lsa_delete(his);
continue;
- break;
}
if (OSPF6_LSA_SCOPE(his->header->type) == OSPF6_SCOPE_AS
if (IS_OSPF6_DEBUG_MESSAGE(oh->type, RECV))
zlog_debug("Ignoring LSA of reserved scope");
continue;
- break;
}
/* Find database copy */
zlog_debug("Ignoring LSA of reserved scope");
ospf6_lsa_delete(his);
continue;
- break;
}
if (IS_OSPF6_DEBUG_MESSAGE(oh->type, RECV))
else
return memcmp(&a->address, &b->address,
sizeof(struct in6_addr));
-
- return 0;
}
static int ospf6_path_cmp(struct ospf6_path *a, struct ospf6_path *b)