diff options
Diffstat (limited to 'ospf6d/ospf6_intra.c')
| -rw-r--r-- | ospf6d/ospf6_intra.c | 44 |
1 files changed, 33 insertions, 11 deletions
diff --git a/ospf6d/ospf6_intra.c b/ospf6d/ospf6_intra.c index 12d11d45c1..524edd3fae 100644 --- a/ospf6d/ospf6_intra.c +++ b/ospf6d/ospf6_intra.c @@ -193,6 +193,17 @@ static void ospf6_router_lsa_options_set(struct ospf6_area *oa, UNSET_FLAG(router_lsa->bits, OSPF6_ROUTER_BIT_E); } + /* If the router is ASBR and the area-type is NSSA set the + * translate bit in router LSA. + */ + if (IS_AREA_NSSA(oa) + && (ospf6_asbr_is_asbr(oa->ospf6) || IS_OSPF6_ABR(oa->ospf6))) { + if (oa->NSSATranslatorRole == OSPF6_NSSA_ROLE_ALWAYS) + SET_FLAG(router_lsa->bits, OSPF6_ROUTER_BIT_NT); + } else { + UNSET_FLAG(router_lsa->bits, OSPF6_ROUTER_BIT_NT); + } + UNSET_FLAG(router_lsa->bits, OSPF6_ROUTER_BIT_V); UNSET_FLAG(router_lsa->bits, OSPF6_ROUTER_BIT_W); } @@ -2055,6 +2066,7 @@ void ospf6_intra_route_calculation(struct ospf6_area *oa) struct ospf6_lsa *lsa; void (*hook_add)(struct ospf6_route *) = NULL; void (*hook_remove)(struct ospf6_route *) = NULL; + char buf[PREFIX2STR_BUFFER]; if (IS_OSPF6_DEBUG_EXAMIN(INTRA_PREFIX)) zlog_debug("Re-examin intra-routes for area %s", oa->name); @@ -2076,6 +2088,12 @@ void ospf6_intra_route_calculation(struct ospf6_area *oa) oa->route_table->hook_remove = hook_remove; for (route = ospf6_route_head(oa->route_table); route; route = nroute) { + if (IS_OSPF6_DEBUG_EXAMIN(INTRA_PREFIX)) { + prefix2str(&route->prefix, buf, sizeof(buf)); + zlog_debug("%s: route %s, flag 0x%x", __func__, buf, + route->flag); + } + nroute = ospf6_route_next(route); if (CHECK_FLAG(route->flag, OSPF6_ROUTE_REMOVE) && CHECK_FLAG(route->flag, OSPF6_ROUTE_ADD)) { @@ -2092,6 +2110,9 @@ void ospf6_intra_route_calculation(struct ospf6_area *oa) route->flag = 0; } else { /* Redo the summaries as things might have changed */ + if (IS_OSPF6_DEBUG_EXAMIN(INTRA_PREFIX)) + zlog_debug("%s: Originate summary for route %s", + __func__, buf); ospf6_abr_originate_summary(route, oa->ospf6); route->flag = 0; } @@ -2167,8 +2188,8 @@ void ospf6_intra_brouter_calculation(struct ospf6_area *oa) if (IS_OSPF6_DEBUG_BROUTER_SPECIFIC_AREA_ID(oa->area_id) || IS_OSPF6_DEBUG_ROUTE(MEMORY)) - zlog_info("%s: border-router calculation for area %s", __func__, - oa->name); + zlog_debug("%s: border-router calculation for area %s", + __func__, oa->name); hook_add = oa->ospf6->brouter_table->hook_add; hook_remove = oa->ospf6->brouter_table->hook_remove; @@ -2189,8 +2210,8 @@ void ospf6_intra_brouter_calculation(struct ospf6_area *oa) if (IS_OSPF6_DEBUG_BROUTER_SPECIFIC_ROUTER_ID(brouter_id) || IS_OSPF6_DEBUG_ROUTE(MEMORY)) { - zlog_info("%p: mark as removing: area %s brouter %s", - (void *)brouter, oa->name, brouter_name); + zlog_debug("%p: mark as removing: area %s brouter %s", + (void *)brouter, oa->name, brouter_name); ospf6_brouter_debug_print(brouter); } } @@ -2223,8 +2244,8 @@ void ospf6_intra_brouter_calculation(struct ospf6_area *oa) if (IS_OSPF6_DEBUG_BROUTER_SPECIFIC_ROUTER_ID(brouter_id) || IS_OSPF6_DEBUG_ROUTE(MEMORY)) { - zlog_info("%p: transfer: area %s brouter %s", - (void *)brouter, oa->name, brouter_name); + zlog_debug("%p: transfer: area %s brouter %s", + (void *)brouter, oa->name, brouter_name); ospf6_brouter_debug_print(brouter); } } @@ -2297,7 +2318,7 @@ void ospf6_intra_brouter_calculation(struct ospf6_area *oa) brouter_id) || IS_OSPF6_DEBUG_BROUTER_SPECIFIC_AREA_ID( oa->area_id)) - zlog_info( + zlog_debug( "%s: brouter %s disappears via area %s", __func__, brouter_name, oa->name); /* This is used to protect nbrouter from removed from @@ -2325,8 +2346,9 @@ void ospf6_intra_brouter_calculation(struct ospf6_area *oa) brouter_id) || IS_OSPF6_DEBUG_BROUTER_SPECIFIC_AREA_ID( oa->area_id)) - zlog_info("brouter %s still exists via area %s", - brouter_name, oa->name); + zlog_debug( + "brouter %s still exists via area %s", + brouter_name, oa->name); /* But re-originate summaries */ ospf6_abr_originate_summary(brouter, oa->ospf6); } @@ -2341,8 +2363,8 @@ void ospf6_intra_brouter_calculation(struct ospf6_area *oa) if (IS_OSPF6_DEBUG_BROUTER_SPECIFIC_AREA_ID(oa->area_id) || IS_OSPF6_DEBUG_ROUTE(MEMORY)) - zlog_info("%s: border-router calculation for area %s: done", - __func__, oa->name); + zlog_debug("%s: border-router calculation for area %s: done", + __func__, oa->name); } static struct ospf6_lsa_handler router_handler = { |
