/* AS External routes are never considered */
if (route->path.type == OSPF6_PATH_TYPE_EXTERNAL1
|| route->path.type == OSPF6_PATH_TYPE_EXTERNAL2) {
- if (is_debug)
- zlog_debug("Path type is external, skip");
+#if 0
+ zlog_debug("Path type is external, skip");
+#endif
return 0;
}
}
}
+ if (route->path.origin.type ==
+ htons(OSPF6_LSTYPE_INTRA_PREFIX)) {
+ if (!CHECK_FLAG(route->flag, OSPF6_ROUTE_BEST)) {
+ if (is_debug) {
+ prefix2str(&route->prefix, buf,
+ sizeof(buf));
+ zlog_debug("%s: intra-prefix route %s with cost %u is not best, ignore."
+ , __PRETTY_FUNCTION__, buf,
+ route->path.cost);
+ }
+ return 0;
+ }
+ }
+
if (is_debug) {
prefix2str(&route->prefix, buf, sizeof(buf));
zlog_debug("Originating summary in area %s for %s cost %u",
ospf6_abr_delete_route(route, summary,
summary_table, old);
}
- } else if (old)
+ } else if (old) {
+ ospf6_route_remove(summary, summary_table);
ospf6_lsa_purge(old);
-
+ }
return 0;
}
/* if this is a route to ASBR */
if (route->type == OSPF6_DEST_TYPE_ROUTER) {
- /* Only the prefered best path is considered */
+ /* Only the preferred best path is considered */
if (!CHECK_FLAG(route->flag, OSPF6_ROUTE_BEST)) {
if (is_debug)
zlog_debug(
* old as the route.
*/
if (listcount(route->paths) > 1) {
- struct listnode *anode;
- struct ospf6_path *o_path;
-
for (ALL_LIST_ELEMENTS_RO(route->paths, anode,
o_path)) {
inet_ntop(AF_INET,
if (lsa->header->type == htons(OSPF6_LSTYPE_INTER_ROUTER)) {
/* To pass test suites */
+ assert(router_lsa);
if (!OSPF6_OPT_ISSET(router_lsa->options, OSPF6_OPT_R)
|| !OSPF6_OPT_ISSET(router_lsa->options, OSPF6_OPT_V6)) {
if (is_debug)
install_element(CONFIG_NODE, &no_debug_ospf6_abr_cmd);
}
-struct ospf6_lsa_handler inter_prefix_handler = {
+static const struct ospf6_lsa_handler inter_prefix_handler = {
.lh_type = OSPF6_LSTYPE_INTER_PREFIX,
.lh_name = "Inter-Prefix",
.lh_short_name = "IAP",
.lh_get_prefix_str = ospf6_inter_area_prefix_lsa_get_prefix_str,
.lh_debug = 0};
-struct ospf6_lsa_handler inter_router_handler = {
+static const struct ospf6_lsa_handler inter_router_handler = {
.lh_type = OSPF6_LSTYPE_INTER_ROUTER,
.lh_name = "Inter-Router",
.lh_short_name = "IAR",