diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-03-28 22:08:37 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-03-29 14:17:25 -0400 |
| commit | 498b9ba43c1fdd1e1e779234d9898c5d77d0427a (patch) | |
| tree | cab8c81edd452166c7851dfb854f960130ad7c7a | |
| parent | 9576568981c48ef1a0df6e6d3b520f5fa8a23bc2 (diff) | |
bfdd, nhrpd, pimd: When deleting an interface clean up
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>
| -rw-r--r-- | nhrpd/nhrp_interface.c | 6 | ||||
| -rw-r--r-- | pimd/pim_zebra.c | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/nhrpd/nhrp_interface.c b/nhrpd/nhrp_interface.c index ccca100db5..b33eaa0478 100644 --- a/nhrpd/nhrp_interface.c +++ b/nhrpd/nhrp_interface.c @@ -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; } diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c index 10ea17cf1f..aca3569b8c 100644 --- a/pimd/pim_zebra.c +++ b/pimd/pim_zebra.c @@ -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; } |
