summaryrefslogtreecommitdiff
path: root/proto/ospf/lsalib.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2011-03-17 15:53:36 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2011-03-17 15:53:36 +0100
commit8e48831a970a784a979446813191628790d477f1 (patch)
treee3c2e1c2a13ab2249d42b87ce26a1dc02d3faaaf /proto/ospf/lsalib.c
parent93e868c730dc0b1825b2a685e0b066c051b1cb07 (diff)
Vastly improved OSPF reconfiguration.
Now it can handle a change in iface pattern structure. It can add, remove and reconfigure interfaces, vlinks and areas.
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 2f52fe9a..224c345e 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