/* The area link state database consists of the router-LSAs, network-LSAs and summary-LSAs contained in the area structure, along with the AS-external-LSAs contained in the global structure. AS-external-LSAs are omitted from a virtual neighbor's Database summary list. AS-external-LSAs are omitted from the Database summary list if the area has been configured as a stub. */ int nsm_negotiation_done (struct ospf_neighbor *nbr) { struct ospf_area *area = nbr->oi->area; struct ospf_lsa *lsa; struct route_node *rn; LSDB_LOOP (ROUTER_LSDB (area), rn, lsa) ospf_db_summary_add (nbr, lsa); LSDB_LOOP (NETWORK_LSDB (area), rn, lsa) ospf_db_summary_add (nbr, lsa); LSDB_LOOP (SUMMARY_LSDB (area), rn, lsa) ospf_db_summary_add (nbr, lsa); LSDB_LOOP (ASBR_SUMMARY_LSDB (area), rn, lsa) ospf_db_summary_add (nbr, lsa); #ifdef HAVE_OPAQUE_LSA /* Process only if the neighbor is opaque capable. */ if (CHECK_FLAG (nbr->options, OSPF_OPTION_O)) { LSDB_LOOP (OPAQUE_LINK_LSDB (area), rn, lsa) ospf_db_summary_add (nbr, lsa); LSDB_LOOP (OPAQUE_AREA_LSDB (area), rn, lsa) ospf_db_summary_add (nbr, lsa); } #endif /* HAVE_OPAQUE_LSA */ if (CHECK_FLAG (nbr->options, OSPF_OPTION_NP)) { LSDB_LOOP (NSSA_LSDB (area), rn, lsa) ospf_db_summary_add (nbr, lsa); } if (nbr->oi->type != OSPF_IFTYPE_VIRTUALLINK && area->external_routing == OSPF_AREA_DEFAULT) LSDB_LOOP (EXTERNAL_LSDB (nbr->oi->ospf), rn, lsa) ospf_db_summary_add (nbr, lsa); #ifdef HAVE_OPAQUE_LSA if (CHECK_FLAG (nbr->options, OSPF_OPTION_O) && (nbr->oi->type != OSPF_IFTYPE_VIRTUALLINK && area->external_routing == OSPF_AREA_DEFAULT)) LSDB_LOOP (OPAQUE_AS_LSDB (nbr->oi->ospf), rn, lsa) ospf_db_summary_add (nbr, lsa); #endif /* HAVE_OPAQUE_LSA */ return 0; }
void ospf_abr_process_nssa_translates (struct ospf *ospf) { /* Scan through all NSSA_LSDB records for all areas; If P-bit is on, translate all Type-7's to 5's and aggregate or flood install as approved in Type-5 LSDB with XLATE Flag on later, do same for all aggregates... At end, DISCARD all remaining UNAPPROVED Type-5's (Aggregate is for future ) */ listnode node; struct ospf_area *area; struct route_node *rn; struct ospf_lsa *lsa; if (IS_DEBUG_OSPF_NSSA) zlog_info ("ospf_abr_process_nssa_translates(): Start"); for (node = listhead (ospf->areas); node; nextnode (node)) { area = getdata (node); if (! area->NSSATranslator) continue; /* skip if not translator */ if (area->external_routing != OSPF_AREA_NSSA) continue; /* skip if not Nssa Area */ if (IS_DEBUG_OSPF_NSSA) zlog_info ("ospf_abr_process_nssa_translates(): " "looking at area %s", inet_ntoa (area->area_id)); LSDB_LOOP (NSSA_LSDB (area), rn, lsa) ospf_abr_translate_nssa (area, lsa); } if (IS_DEBUG_OSPF_NSSA) zlog_info ("ospf_abr_process_nssa_translates(): Stop"); }