diff --git a/isisd/isis_spf.c b/isisd/isis_spf.c index 36986a19c558..b1847181ee03 100644 --- a/isisd/isis_spf.c +++ b/isisd/isis_spf.c @@ -1213,11 +1213,16 @@ static int isis_spf_process_lsp(struct isis_spftree *spftree, else fragnode = listnextnode(fragnode); - if (fragnode) { + while (fragnode) { lsp = listgetdata(fragnode); - goto lspfragloop; + if (lsp->tlvs) + break; + fragnode = listnextnode(fragnode); } + if (fragnode) + goto lspfragloop; + return ISIS_OK; }