int is_debug = 0;
struct ospf6_inter_prefix_lsa *prefix_lsa = NULL;
struct ospf6_inter_router_lsa *router_lsa = NULL;
+ struct ospf6_path *path;
memset(&prefix, 0, sizeof(prefix));
ospf6_route_copy_nexthops(route, abr_entry);
+ path = ospf6_path_dup(&route->path);
+ ospf6_copy_nexthops(path->nh_list, abr_entry->nh_list);
+ listnode_add_sort(route->paths, path);
/* (7) If the routes are identical, copy the next hops over to existing
route. ospf6's route table implementation will otherwise string both
char buf[PREFIX2STR_BUFFER];
struct interface *ifp;
int direct_connect = 0;
+ struct ospf6_path *path;
if (OSPF6_LSA_IS_MAXAGE(lsa))
return;
ospf6_route_copy_nexthops(route, ls_entry);
}
+ path = ospf6_path_dup(&route->path);
+ ospf6_copy_nexthops(path->nh_list, route->path.nh_list);
+ listnode_add_sort(route->paths, path);
+
if (IS_OSPF6_DEBUG_EXAMIN(INTRA_PREFIX)) {
prefix2str(&route->prefix, buf, sizeof(buf));
- zlog_debug(" route %s add with nh count %u", buf,
+ zlog_debug(" route %s add with cost %u nh count %u",
+ buf, route->path.cost,
listcount(route->nh_list));
}
&& CHECK_FLAG(brouter->flag, OSPF6_ROUTE_ADD)) {
UNSET_FLAG(brouter->flag, OSPF6_ROUTE_REMOVE);
UNSET_FLAG(brouter->flag, OSPF6_ROUTE_ADD);
- zlog_debug("%s: EVENT unset REOUTE_REMOVE and ROUTE_ADD brouter %s",
- __PRETTY_FUNCTION__, brouter_name);
- ospf6_brouter_debug_print(brouter);
}
if (CHECK_FLAG(brouter->flag, OSPF6_ROUTE_REMOVE)) {
if (ra->type != rb->type)
return (ra->type - rb->type);
- if (ra->path.area_id != rb->path.area_id)
- return (ntohl(ra->path.area_id) - ntohl(rb->path.area_id));
-
if (ra->path.type != rb->path.type)
return (ra->path.type - rb->path.type);
return (ra->path.cost - rb->path.cost);
}
+ if (ra->path.area_id != rb->path.area_id)
+ return (ntohl(ra->path.area_id) - ntohl(rb->path.area_id));
+
return 0;
}