zebra_mpls. Set best lsp nhlfe to null on deletion

When a nhlfe was deleted and it happened to be the best,
lsp->best_nhlfe was not updated causing lsp_process() to see
an inexistent nhlfe.
Fix: set lsp->best_nhlfe to null on deletion.
This commit is contained in:
Fredi Raspall 2016-11-30 19:15:07 +01:00 committed by Renato Westphal
parent 6ba069f3ba
commit bb49a12161

View File

@ -751,6 +751,9 @@ nhlfe_del (zebra_nhlfe_t *nhlfe)
else
lsp->nhlfe_list = nhlfe->next;
if (nhlfe == lsp->best_nhlfe)
lsp->best_nhlfe = NULL;
XFREE (MTYPE_NHLFE, nhlfe);
return 0;