ospf6d: handle seqnum wrapping
Signed-off-by: Shrijeet Mukherjee <shm at cumulusnetworks.com>
Reviewed-by: Dinesh G Dutt <ddutt at cumulusnetworks.com>
[DL: mechanical adjust to rebase]
[DL: adjust to removal of timerwheel code]
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
diff --git a/ospf6d/ospf6_lsdb.c b/ospf6d/ospf6_lsdb.c
index b13ae9b..5138d1c 100644
--- a/ospf6d/ospf6_lsdb.c
+++ b/ospf6d/ospf6_lsdb.c
@@ -465,7 +465,18 @@
}
if (IS_OSPF6_DEBUG_LSA_TYPE (lsa->header->type))
zlog_debug ("Remove MaxAge %s", lsa->name);
- ospf6_lsdb_remove (lsa, lsdb);
+ if (CHECK_FLAG(lsa->flag, OSPF6_LSA_SEQWRAPPED))
+ {
+ UNSET_FLAG(lsa->flag, OSPF6_LSA_SEQWRAPPED);
+ /*
+ * lsa->header->age = 0;
+ */
+ lsa->header->seqnum = htonl(OSPF_MAX_SEQUENCE_NUMBER + 1);
+ ospf6_lsa_checksum (lsa->header);
+ thread_execute (master, ospf6_lsa_refresh, lsa, 0);
+ } else {
+ ospf6_lsdb_remove (lsa, lsdb);
+ }
}
return (reschedule);