]> git.puffer.fish Git - mirror/frr.git/commitdiff
bfdd, nhrpd, pimd: When deleting an interface clean up 4050/head
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 29 Mar 2019 02:08:37 +0000 (22:08 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 29 Mar 2019 18:19:05 +0000 (14:19 -0400)
When we delete an interface, we need to set the interface
ifindex to an internal value so that we don't end up in
a state where the re-addition of the same ifindex, due to
a rename operation, causes an infinite loop.

Fixes:#4007
Fix-Suggested-by: Saravanan K
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
nhrpd/nhrp_interface.c
pimd/pim_zebra.c

index 3a42712748cd3b768820f0f0ca7d60df4c39cc96..13297aa344b0cc2fffcb98cec182dd4a26eaf06e 100644 (file)
@@ -323,9 +323,11 @@ int nhrp_interface_delete(int cmd, struct zclient *client, zebra_size_t length,
                return 0;
 
        debugf(NHRP_DEBUG_IF, "if-delete: %s", ifp->name);
-       if_set_index(ifp, ifp->ifindex);
+
        nhrp_interface_update(ifp);
-       /* if_delete(ifp); */
+
+       if_set_index(ifp, IFINDEX_INTERNAL);
+
        return 0;
 }
 
index ad60e8e3a6a6aaef35d169892dda1557f0a15b2b..30d66c835b229e58cca9117cafafce10a547cde7 100644 (file)
@@ -152,6 +152,8 @@ static int pim_zebra_if_del(int command, struct zclient *zclient,
        if (!if_is_operative(ifp))
                pim_if_addr_del_all(ifp);
 
+       if_set_index(ifp, IFINDEX_INTERNAL);
+
        return 0;
 }