]> git.puffer.fish Git - mirror/frr.git/commitdiff
isisd: Lsp fragments will delete the corresponding dyn_cache entry. 17044/head
authorbaozhen-H3C <bao.zhen@h3c.com>
Wed, 9 Oct 2024 09:58:05 +0000 (17:58 +0800)
committerb29332 <bao.zhen@h3c.com>
Wed, 9 Oct 2024 11:41:07 +0000 (19:41 +0800)
When LSP fragments age, isis_dynhn_remove() is also called to remove the corresponding dyhn_cache entries.

Signed-off-by: baozhen-H3C <bao.zhen@h3c.com>
isisd/isis_lsp.c

index 391d42fba156f5347d242336b131093bf3e534c5..c00b7efed77aa6a60ff1e26767b10102d770e92a 100644 (file)
@@ -119,6 +119,10 @@ static void lsp_destroy(struct isis_lsp *lsp)
        lsp_clear_data(lsp);
 
        if (!LSP_FRAGMENT(lsp->hdr.lsp_id)) {
+               /* Only non-pseudo nodes and non-fragment LSPs can delete nodes. */
+               if (!LSP_PSEUDO_ID(lsp->hdr.lsp_id))
+                       isis_dynhn_remove(lsp->area->isis, lsp->hdr.lsp_id);
+
                if (lsp->lspu.frags) {
                        lsp_remove_frags(&lsp->area->lspdb[lsp->level - 1],
                                        lsp->lspu.frags);
@@ -2226,10 +2230,6 @@ void lsp_tick(struct event *thread)
                                                        &area->lspdb[level],
                                                        next);
 
-                               if (!LSP_PSEUDO_ID(lsp->hdr.lsp_id))
-                                       isis_dynhn_remove(area->isis,
-                                                         lsp->hdr.lsp_id);
-
                                lspdb_del(&area->lspdb[level], lsp);
                                lsp_destroy(lsp);
                                lsp = NULL;