diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c index b1beb45630..82548454a5 100644 --- a/pimd/pim_iface.c +++ b/pimd/pim_iface.c @@ -1762,3 +1762,16 @@ void pim_iface_init(void) if_zapi_callbacks(pim_ifp_create, pim_ifp_up, pim_ifp_down, pim_ifp_destroy); } + +static void pim_if_membership_clear(struct interface *ifp) +{ + struct pim_interface *pim_ifp; + + pim_ifp = ifp->info; + assert(pim_ifp); + + if (pim_ifp->pim_enable && pim_ifp->gm_enable) + return; + + pim_ifchannel_membership_clear(ifp); +} diff --git a/pimd/pim_nb_config.c b/pimd/pim_nb_config.c index d7e4154558..d5d864f4a7 100644 --- a/pimd/pim_nb_config.c +++ b/pimd/pim_nb_config.c @@ -45,20 +45,6 @@ MACRO_REQUIRE_SEMICOLON() #define yang_dnode_get_pimaddr yang_dnode_get_ipv4 #endif /* PIM_IPV != 6 */ -static void pim_if_membership_clear(struct interface *ifp) -{ - struct pim_interface *pim_ifp; - - pim_ifp = ifp->info; - assert(pim_ifp); - - if (pim_ifp->pim_enable && pim_ifp->gm_enable) { - return; - } - - pim_ifchannel_membership_clear(ifp); -} - /* * When PIM is disabled on interface, IGMPv3 local membership * information is not injected into PIM interface state.