|
@@ -472,6 +472,15 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ip_mc_list *pmc,
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /* Based on RFC3376 5.1. Should not send source-list change
|
|
|
|
+ * records when there is a filter mode change.
|
|
|
|
+ */
|
|
|
|
+ if (((gdeleted && pmc->sfmode == MCAST_EXCLUDE) ||
|
|
|
|
+ (!gdeleted && pmc->crcount)) &&
|
|
|
|
+ (type == IGMPV3_ALLOW_NEW_SOURCES ||
|
|
|
|
+ type == IGMPV3_BLOCK_OLD_SOURCES) && psf->sf_crcount)
|
|
|
|
+ goto decrease_sf_crcount;
|
|
|
|
+
|
|
/* clear marks on query responses */
|
|
/* clear marks on query responses */
|
|
if (isquery)
|
|
if (isquery)
|
|
psf->sf_gsresp = 0;
|
|
psf->sf_gsresp = 0;
|
|
@@ -499,6 +508,7 @@ static struct sk_buff *add_grec(struct sk_buff *skb, struct ip_mc_list *pmc,
|
|
scount++; stotal++;
|
|
scount++; stotal++;
|
|
if ((type == IGMPV3_ALLOW_NEW_SOURCES ||
|
|
if ((type == IGMPV3_ALLOW_NEW_SOURCES ||
|
|
type == IGMPV3_BLOCK_OLD_SOURCES) && psf->sf_crcount) {
|
|
type == IGMPV3_BLOCK_OLD_SOURCES) && psf->sf_crcount) {
|
|
|
|
+decrease_sf_crcount:
|
|
psf->sf_crcount--;
|
|
psf->sf_crcount--;
|
|
if ((sdeleted || gdeleted) && psf->sf_crcount == 0) {
|
|
if ((sdeleted || gdeleted) && psf->sf_crcount == 0) {
|
|
if (psf_prev)
|
|
if (psf_prev)
|