summaryrefslogtreecommitdiffstats
path: root/isisd
diff options
context:
space:
mode:
Diffstat (limited to 'isisd')
-rw-r--r--isisd/isis_lsp.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/isisd/isis_lsp.c b/isisd/isis_lsp.c
index 658624370..b56a56fa3 100644
--- a/isisd/isis_lsp.c
+++ b/isisd/isis_lsp.c
@@ -1930,6 +1930,27 @@ int lsp_tick(struct thread *thread)
area->area_tag, lsp->level,
rawlspid_print(lsp->hdr.lsp_id),
lsp->hdr.seqno);
+
+ /* if we're aging out fragment 0,
+ * lsp_destroy() below will delete all
+ * other fragments too, so we need to
+ * skip over those
+ */
+ while (!LSP_FRAGMENT(lsp->hdr.lsp_id)
+ && dnode_next) {
+ struct isis_lsp *nextlsp;
+
+ nextlsp = dnode_get(dnode_next);
+ if (memcmp(nextlsp->hdr.lsp_id,
+ lsp->hdr.lsp_id,
+ ISIS_SYS_ID_LEN + 1))
+ break;
+
+ dnode_next = dict_next(
+ area->lspdb[level],
+ dnode_next);
+ }
+
lsp_destroy(lsp);
lsp = NULL;
dict_delete_free(area->lspdb[level],