]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[MCAST]: ip[6]_mc_add_src should be called when number of sources is zero
authorYan Zheng <yanzheng@21cn.com>
Fri, 28 Oct 2005 00:02:08 +0000 (08:02 +0800)
committerArnaldo Carvalho de Melo <acme@mandriva.com>
Wed, 2 Nov 2005 23:03:57 +0000 (21:03 -0200)
And filter mode is exclude.

Further explanation by David Stevens:

Multicast source filters aren't widely used yet, and that's really the only
feature that's affected if an application actually exercises this bug, as far
as I can tell. An ordinary filter-less multicast join should still work, and
only forwarded multicast traffic making use of filters and doing empty-source
filters with the MSFILTER ioctl would be at risk of not getting multicast
traffic forwarded to them because the reports generated would not be based on
the correct counts.

Signed-off-by: Yan Zheng <yanzheng@21cn.com
Acked-by: David L Stevens <dlstevens@us.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
net/ipv4/igmp.c
net/ipv6/mcast.c

index 8b6d3939e1e60922fc41d6e7e04723486aade385..c6247fc84060a2d509edd0477efe2383408031f4 100644 (file)
@@ -1908,8 +1908,11 @@ int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf, int ifindex)
                        sock_kfree_s(sk, newpsl, IP_SFLSIZE(newpsl->sl_max));
                        goto done;
                }
-       } else
+       } else {
                newpsl = NULL;
+               (void) ip_mc_add_src(in_dev, &msf->imsf_multiaddr,
+                                    msf->imsf_fmode, 0, NULL, 0);
+       }
        psl = pmc->sflist;
        if (psl) {
                (void) ip_mc_del_src(in_dev, &msf->imsf_multiaddr, pmc->sfmode,
index 966b2372aaab46eb8b140d779b2e048a3defdaf5..f15e04ad026effec3f907f6eb2db1eb140e54c3b 100644 (file)
@@ -545,8 +545,10 @@ int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf)
                        sock_kfree_s(sk, newpsl, IP6_SFLSIZE(newpsl->sl_max));
                        goto done;
                }
-       } else
+       } else {
                newpsl = NULL;
+               (void) ip6_mc_add_src(idev, group, gsf->gf_fmode, 0, NULL, 0);
+       }
        psl = pmc->sflist;
        if (psl) {
                (void) ip6_mc_del_src(idev, group, pmc->sfmode,