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>
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;
}
if (!if_is_operative(ifp))
pim_if_addr_del_all(ifp);
+ if_set_index(ifp, IFINDEX_INTERNAL);
+
return 0;
}