From 1925ca8f4e40f8521beac35dc78e0837fa2f6874 Mon Sep 17 00:00:00 2001 From: Sarita Patra Date: Fri, 24 Jun 2022 07:48:03 -0700 Subject: [PATCH] pimd: fix pim interface deletion flow Deletion of pim interface(pim_if_delete) should do the below things before cleanup. 1. Send a hello message with zero hold time. 2. Delete all the neighbors. 3. Close the pim socket. Signed-off-by: Sarita Patra --- pimd/pim_iface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c index 65889fd57b..d10d3e2811 100644 --- a/pimd/pim_iface.c +++ b/pimd/pim_iface.c @@ -213,8 +213,8 @@ void pim_if_delete(struct interface *ifp) #if PIM_IPV == 4 igmp_sock_delete_all(ifp); #endif - - pim_neighbor_delete_all(ifp, "Interface removed from configuration"); + if (pim_ifp->pim_sock_fd >= 0) + pim_sock_delete(ifp, "Interface removed from configuration"); pim_if_del_vif(ifp); -- 2.39.5