return 0;
}
+
+/* Flush the LSAs for the specific area */
+void ospf_flush_lsa_from_area(struct ospf *ospf, struct in_addr area_id,
+ int type)
+{
+ struct ospf_area *area;
+ struct route_node *rn;
+ struct ospf_lsa *lsa;
+
+ area = ospf_area_get(ospf, area_id);
+
+ switch (type) {
+ case OSPF_AS_EXTERNAL_LSA:
+ if ((area->external_routing == OSPF_AREA_NSSA) ||
+ (area->external_routing == OSPF_AREA_STUB)) {
+ LSDB_LOOP (EXTERNAL_LSDB(ospf), rn, lsa)
+ if (IS_LSA_SELF(lsa) &&
+ !(CHECK_FLAG(lsa->flags,
+ OSPF_LSA_LOCAL_XLT)))
+ ospf_lsa_flush_area(lsa, area);
+ }
+ break;
+ case OSPF_AS_NSSA_LSA:
+ LSDB_LOOP (NSSA_LSDB(area), rn, lsa)
+ if (IS_LSA_SELF(lsa))
+ ospf_lsa_flush_area(lsa, area);
+ break;
+ default:
+ break;
+ }
+}
struct ospf_lsa *);
extern struct ospf_lsa *ospf_translated_nssa_originate(struct ospf *,
struct ospf_lsa *);
-
+extern void ospf_flush_lsa_from_area(struct ospf *ospf, struct in_addr area_id,
+ int type);
#endif /* _ZEBRA_OSPF_LSA_H */
return CMD_WARNING_CONFIG_FAILED;
}
+ /* Flush the external LSAs from the specified area */
+ ospf_flush_lsa_from_area(ospf, area_id, OSPF_AS_EXTERNAL_LSA);
ospf_area_no_summary_unset(ospf, area_id);
return CMD_SUCCESS;
ospf_area_no_summary_unset(ospf, area_id);
}
+ /* Flush the external LSA for the specified area */
+ ospf_flush_lsa_from_area(ospf, area_id, OSPF_AS_EXTERNAL_LSA);
ospf_schedule_abr_task(ospf);
return CMD_SUCCESS;
VTY_GET_OSPF_AREA_ID_NO_BB("NSSA", area_id, format,
argv[idx_ipv4_number]->arg);
+ /* Flush the NSSA LSA for the specified area */
+ ospf_flush_lsa_from_area(ospf, area_id, OSPF_AS_NSSA_LSA);
ospf_area_nssa_unset(ospf, area_id, argc);
ospf_schedule_abr_task(ospf);