]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: zebra_mpls_lsp_uninstall was not being called
authorDaniel Walton <dwalton@cumulusnetworks.com>
Fri, 12 May 2017 13:34:51 +0000 (13:34 +0000)
committerDaniel Walton <dwalton@cumulusnetworks.com>
Fri, 12 May 2017 13:34:51 +0000 (13:34 +0000)
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Old entries were not being removed from the MPLS table.

zebra/zebra_rib.c

index e4d583d5f2ae7f8eb017c0f531c37157ed439e49..07b19155e2c8731c559cef755be6462a876937fd 100644 (file)
@@ -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);
                 }