]> git.proxmox.com Git - mirror_frr.git/commitdiff
bfdd, nhrpd, pimd: When deleting an interface clean up
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 16:44:05 +0000 (12:44 -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>
bfdd/ptm_adapter.c
nhrpd/nhrp_interface.c
pimd/pim_zebra.c

index b44d13f132a34b67df5216cccc19b8d3e587a4ab..8d80b9468db5374af1dbdeda8af84b00b05f9ff2 100644 (file)
@@ -613,6 +613,8 @@ static int bfdd_interface_update(int cmd, struct zclient *zc,
 
        bfdd_sessions_disable_interface(ifp);
 
+       if_set_index(ifp, IFINDEX_INTERNAL);
+
        return 0;
 }
 
index ccca100db57940b038501c5a08b44cccd3958e20..b33eaa047849e38bad0f6c4e36be90aa5cce105e 100644 (file)
@@ -327,9 +327,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 78cccd5877732e0594fc75aa69f706626d8fbca0..753efb95006c6ff3413f1bb834b0c9bb4369c4f9 100644 (file)
@@ -150,6 +150,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;
 }