if (leavegroup) err = ip_mc_leave_group(sk, &imr); 
int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf, int ifindex){	int err;	struct ip_mreqn	imr;	u32 addr = msf->imsf_multiaddr;	struct ip_mc_socklist *pmc;	struct in_device *in_dev;	struct inet_sock *inet = inet_sk(sk);	struct ip_sf_socklist *newpsl, *psl;	if (!MULTICAST(addr))		return -EINVAL;	if (msf->imsf_fmode != MCAST_INCLUDE &&	    msf->imsf_fmode != MCAST_EXCLUDE)		return -EINVAL;	rtnl_shlock();	imr.imr_multiaddr.s_addr = msf->imsf_multiaddr;	imr.imr_address.s_addr = msf->imsf_interface;	imr.imr_ifindex = ifindex;	in_dev = ip_mc_find_dev(&imr);	if (!in_dev) {		err = -ENODEV;		goto done;	}	for (pmc=inet->mc_list; pmc; pmc=pmc->next) {		if (pmc->multi.imr_multiaddr.s_addr == msf->imsf_multiaddr &&		    pmc->multi.imr_ifindex == imr.imr_ifindex)			break;	}	if (!pmc) {		/* must have a prior join */		err = -EINVAL;		goto done;	}	if (msf->imsf_numsrc) {		newpsl = (struct ip_sf_socklist *)sock_kmalloc(sk,				IP_SFLSIZE(msf->imsf_numsrc), GFP_KERNEL);		if (!newpsl) {			err = -ENOBUFS;			goto done;		}		newpsl->sl_max = newpsl->sl_count = msf->imsf_numsrc;		memcpy(newpsl->sl_addr, msf->imsf_slist,			msf->imsf_numsrc * sizeof(msf->imsf_slist[0]));		err = ip_mc_add_src(in_dev, &msf->imsf_multiaddr,			msf->imsf_fmode, newpsl->sl_count, newpsl->sl_addr, 0);		if (err) {			sock_kfree_s(sk, newpsl, IP_SFLSIZE(newpsl->sl_max));			goto done;		}	} else		newpsl = NULL;	psl = pmc->sflist;	if (psl) {		(void) ip_mc_del_src(in_dev, &msf->imsf_multiaddr, pmc->sfmode,			psl->sl_count, psl->sl_addr, 0);		sock_kfree_s(sk, psl, IP_SFLSIZE(psl->sl_max));	} else		(void) ip_mc_del_src(in_dev, &msf->imsf_multiaddr, pmc->sfmode,			0, NULL, 0);	pmc->sflist = newpsl;	pmc->sfmode = msf->imsf_fmode;	err = 0;done:	rtnl_shunlock();	return err;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/9951f036fe8a4e6b21962559c64ff13b290ff01a/igmp.c/clean/net/ipv4/igmp.c