summaryrefslogtreecommitdiff
path: root/zebra/zebra_mpls.c
diff options
context:
space:
mode:
authorFredi Raspall <fredi@voltanet.io>2016-11-30 19:15:07 +0100
committerRenato Westphal <renato@opensourcerouting.org>2016-12-14 18:28:26 -0200
commitbb49a12161b8ab63bdf2f2f3f1566aa1bb32d124 (patch)
treee112d3573237bc64cc09542d6e1242bed95e758f /zebra/zebra_mpls.c
parent6ba069f3ba5b057afe9c3a144be2928efcdb6520 (diff)
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.
Diffstat (limited to 'zebra/zebra_mpls.c')
-rw-r--r--zebra/zebra_mpls.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c
index b057a78788..decf3f5f8d 100644
--- a/zebra/zebra_mpls.c
+++ b/zebra/zebra_mpls.c
@@ -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;