diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c index 2b11d89a31..92f9f06942 100644 --- a/ospf6d/ospf6_asbr.c +++ b/ospf6d/ospf6_asbr.c @@ -1307,9 +1307,9 @@ void ospf6_asbr_remove_externals_from_area(struct ospf6_area *oa) struct ospf6 *ospf6 = oa->ospf6; const struct route_node *iterend; - /* skip if router is in other non-stub areas */ + /* skip if router is in other non-stub/non-NSSA areas */ for (ALL_LIST_ELEMENTS(ospf6->area_list, node, nnode, area)) - if (!IS_AREA_STUB(area)) + if (!IS_AREA_STUB(area) && !IS_AREA_NSSA(area)) return; /* if router is only in a stub area then purge AS-External LSAs */ diff --git a/ospf6d/ospf6_nssa.c b/ospf6d/ospf6_nssa.c index 7782dd8774..cda92054a2 100644 --- a/ospf6d/ospf6_nssa.c +++ b/ospf6d/ospf6_nssa.c @@ -1218,6 +1218,9 @@ static void ospf6_area_nssa_update(struct ospf6_area *area) if (IS_AREA_NSSA(area)) { OSPF6_ROUTER_LSA_SCHEDULE(area); + /* Flush external LSAs. */ + ospf6_asbr_remove_externals_from_area(area); + /* Check if router is ABR */ if (ospf6_check_and_set_router_abr(area->ospf6)) { if (IS_OSPF6_DEBUG_NSSA)