Skip to content

Commit

Permalink
isisd: Lsp fragments will delete the corresponding dyn_cache entry.
Browse files Browse the repository at this point in the history
When LSP fragments age, isis_dynhn_remove() is also called to remove the corresponding dyhn_cache entries.

Signed-off-by: baozhen-H3C <[email protected]>
  • Loading branch information
baozhen-H3C committed Oct 9, 2024
1 parent 93032f1 commit 54dedc5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions isisd/isis_lsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 54dedc5

Please sign in to comment.