diff options
| author | Mobashshera Rasool <mrasool@vmware.com> | 2023-01-03 05:37:34 -0800 | 
|---|---|---|
| committer | Mobashshera Rasool <mrasool@vmware.com> | 2023-06-06 23:58:29 -0700 | 
| commit | e7356fdba11691483d3e927d74aa50ffc62e900b (patch) | |
| tree | fca9149be4c5181d5af0e1df72920d528075e3e8 /pimd/pim_iface.c | |
| parent | 7f0c12d5b3f79c13c487b4b409f24654b0c87da3 (diff) | |
pimd, pim6d: Move api pim_if_membership_clear
Move pim_if_membership_clear api from pimd/pim_nb_config.c
to pimd/pim_iface.c
Also fixed curly braces warning
WARNING: braces {} are not necessary for single statement blocks
1773: FILE: /tmp/f1-127504/pim_iface.c:1773:
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
Diffstat (limited to 'pimd/pim_iface.c')
| -rw-r--r-- | pimd/pim_iface.c | 13 | 
1 files changed, 13 insertions, 0 deletions
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); +}  | 
