summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_lsdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospf6d/ospf6_lsdb.c')
-rw-r--r--ospf6d/ospf6_lsdb.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/ospf6d/ospf6_lsdb.c b/ospf6d/ospf6_lsdb.c
index 7455d835..0edc7a34 100644
--- a/ospf6d/ospf6_lsdb.c
+++ b/ospf6d/ospf6_lsdb.c
@@ -481,6 +481,29 @@ ospf6_lsdb_remove_all (struct ospf6_lsdb *lsdb)
ospf6_lsdb_remove (lsa, lsdb);
}
+int
+ospf6_lsdb_maxage_remover (struct ospf6_lsdb *lsdb)
+{
+ int reschedule = 0;
+ struct ospf6_lsa *lsa;
+
+ for (lsa = ospf6_lsdb_head (lsdb); lsa; lsa = ospf6_lsdb_next (lsa))
+ {
+ if (! OSPF6_LSA_IS_MAXAGE (lsa))
+ continue;
+ if (lsa->retrans_count != 0)
+ {
+ reschedule = 1;
+ continue;
+ }
+ if (IS_OSPF6_DEBUG_LSA_TYPE (lsa->header->type))
+ zlog_debug ("Remove MaxAge %s", lsa->name);
+ ospf6_lsdb_remove (lsa, lsdb);
+ }
+
+ return (reschedule);
+}
+
void
ospf6_lsdb_show (struct vty *vty, int level,
u_int16_t *type, u_int32_t *id, u_int32_t *adv_router,