summaryrefslogtreecommitdiffstats
path: root/proto/ospf/lsalib.c
diff options
context:
space:
mode:
Diffstat (limited to 'proto/ospf/lsalib.c')
-rw-r--r--proto/ospf/lsalib.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/proto/ospf/lsalib.c b/proto/ospf/lsalib.c
index 2f52fe9..224c345 100644
--- a/proto/ospf/lsalib.c
+++ b/proto/ospf/lsalib.c
@@ -23,6 +23,18 @@ flush_lsa(struct top_hash_entry *en, struct proto_ospf *po)
ospf_hash_delete(po->gr, en);
}
+void
+ospf_flush_area(struct proto_ospf *po, u32 areaid)
+{
+ struct top_hash_entry *en, *nxt;
+
+ WALK_SLIST_DELSAFE(en, nxt, po->lsal)
+ {
+ if ((LSA_SCOPE(&en->lsa) == LSA_SCOPE_AREA) && (en->domain == areaid))
+ flush_lsa(en, po);
+ }
+}
+
/**
* ospf_age
* @po: ospf protocol