|
@@ -2071,21 +2071,26 @@ static int ip_mc_add_src(struct in_device *in_dev, __be32 *pmca, int sfmode,
|
|
|
|
|
|
static void ip_mc_clear_src(struct ip_mc_list *pmc)
|
|
static void ip_mc_clear_src(struct ip_mc_list *pmc)
|
|
{
|
|
{
|
|
- struct ip_sf_list *psf, *nextpsf;
|
|
|
|
|
|
+ struct ip_sf_list *psf, *nextpsf, *tomb, *sources;
|
|
|
|
|
|
- for (psf = pmc->tomb; psf; psf = nextpsf) {
|
|
|
|
|
|
+ spin_lock_bh(&pmc->lock);
|
|
|
|
+ tomb = pmc->tomb;
|
|
|
|
+ pmc->tomb = NULL;
|
|
|
|
+ sources = pmc->sources;
|
|
|
|
+ pmc->sources = NULL;
|
|
|
|
+ pmc->sfmode = MCAST_EXCLUDE;
|
|
|
|
+ pmc->sfcount[MCAST_INCLUDE] = 0;
|
|
|
|
+ pmc->sfcount[MCAST_EXCLUDE] = 1;
|
|
|
|
+ spin_unlock_bh(&pmc->lock);
|
|
|
|
+
|
|
|
|
+ for (psf = tomb; psf; psf = nextpsf) {
|
|
nextpsf = psf->sf_next;
|
|
nextpsf = psf->sf_next;
|
|
kfree(psf);
|
|
kfree(psf);
|
|
}
|
|
}
|
|
- pmc->tomb = NULL;
|
|
|
|
- for (psf = pmc->sources; psf; psf = nextpsf) {
|
|
|
|
|
|
+ for (psf = sources; psf; psf = nextpsf) {
|
|
nextpsf = psf->sf_next;
|
|
nextpsf = psf->sf_next;
|
|
kfree(psf);
|
|
kfree(psf);
|
|
}
|
|
}
|
|
- pmc->sources = NULL;
|
|
|
|
- pmc->sfmode = MCAST_EXCLUDE;
|
|
|
|
- pmc->sfcount[MCAST_INCLUDE] = 0;
|
|
|
|
- pmc->sfcount[MCAST_EXCLUDE] = 1;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/* Join a multicast group
|
|
/* Join a multicast group
|