From: Daniel Walton Date: Fri, 12 May 2017 13:34:51 +0000 (+0000) Subject: zebra: zebra_mpls_lsp_uninstall was not being called X-Git-Tag: reindent-master-before~175^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=71e04b9f7ce518f0e7e33909f79b1d975a6421c8;p=mirror%2Ffrr.git zebra: zebra_mpls_lsp_uninstall was not being called Signed-off-by: Daniel Walton Old entries were not being removed from the MPLS table. --- diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index e4d583d5f2..07b19155e2 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -1382,6 +1382,11 @@ rib_process_update_fib (struct zebra_vrf *zvrf, struct route_node *rn, zlog_debug ("%u:%s: Updating route rn %p, rib %p (type %d)", zvrf_id (zvrf), buf, rn, new, new->type); } + + /* If labeled-unicast route, uninstall transit LSP. */ + if (zebra_rib_labeled_unicast (old)) + zebra_mpls_lsp_uninstall (zvrf, rn, old); + /* Non-system route should be installed. */ if (!RIB_SYSTEM_ROUTE (new)) { @@ -1403,10 +1408,6 @@ rib_process_update_fib (struct zebra_vrf *zvrf, struct route_node *rn, { if (RIB_SYSTEM_ROUTE(new)) { - /* If labeled-unicast route, uninstall transit LSP. */ - if (zebra_rib_labeled_unicast (old)) - zebra_mpls_lsp_uninstall (zvrf, rn, old); - if (!RIB_SYSTEM_ROUTE (old)) rib_uninstall_kernel (rn, old); }