]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: fix mpls ftn uninstall
authorEmanuele Di Pascale <emanuele@voltanet.io>
Wed, 18 Sep 2019 14:01:36 +0000 (16:01 +0200)
committerEmanuele Di Pascale <emanuele@voltanet.io>
Wed, 18 Sep 2019 14:03:52 +0000 (16:03 +0200)
when a client disconnects, we iterate over the routing table to
remove any label that originated from that client. However we
were erroneously passing the route type to the function, while
it was expecting the lsp type. As a result, for example, killing
ldpd would not remove the ldp labels from the routes.

Kudos to @rwestphal for pointing me to the source of the issue.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
zebra/zebra_mpls.c

index 3c4497ebd2d7de5cd5851f11ec89ec1a9d954fa7..8088ec1bfe2f048486d10f7d28aecadefd8ac78f 100644 (file)
@@ -2326,8 +2326,10 @@ static int zebra_mpls_cleanup_zclient_labels(struct zserv *client)
                             &args);
 
                /* Cleanup FTNs. */
-               mpls_ftn_uninstall_all(zvrf, AFI_IP, client->proto);
-               mpls_ftn_uninstall_all(zvrf, AFI_IP6, client->proto);
+               mpls_ftn_uninstall_all(zvrf, AFI_IP,
+                                      lsp_type_from_re_type(client->proto));
+               mpls_ftn_uninstall_all(zvrf, AFI_IP6,
+                                      lsp_type_from_re_type(client->proto));
        }
 
        return 0;