diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-03-29 03:08:37 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-03-29 17:44:05 +0100 |
commit | 9d6c33eadfde3baf29bee3bc72cd06ae5ea8a196 (patch) | |
tree | e1dbea776fce13e34db0578e85bec6d64e0f077b /nhrpd/nhrp_interface.c | |
parent | Merge pull request #4026 from donaldsharp/pim_interface_fixup (diff) | |
download | frr-9d6c33eadfde3baf29bee3bc72cd06ae5ea8a196.tar.xz frr-9d6c33eadfde3baf29bee3bc72cd06ae5ea8a196.zip |
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>
Diffstat (limited to 'nhrpd/nhrp_interface.c')
-rw-r--r-- | nhrpd/nhrp_interface.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nhrpd/nhrp_interface.c b/nhrpd/nhrp_interface.c index ccca100db..b33eaa047 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; } |