|
Dave,
Here's the 2.4.x version of the patch.
+-DLS
diff -ruN linux-2.4.25-pre7/net/ipv4/igmp.c linux-2.4.25-pre7F1/net/ipv4/igmp.c
--- linux-2.4.25-pre7/net/ipv4/igmp.c 2004-01-23 13:54:35.000000000 -0800
+++ linux-2.4.25-pre7F1/net/ipv4/igmp.c 2004-01-23 13:58:43.000000000 -0800
@@ -2071,16 +2071,19 @@
* Differs from 2.5.x here. +-DLS 4/23/03
*/
if (im) {
- for (psf=im->sources; psf; psf=psf->sf_next) {
- if (psf->sf_inaddr == src_addr)
- break;
- }
- if (psf)
- rv = psf->sf_count[MCAST_INCLUDE] ||
- psf->sf_count[MCAST_EXCLUDE] !=
- im->sfcount[MCAST_EXCLUDE];
- else
- rv = im->sfcount[MCAST_EXCLUDE] != 0;
+ if (src_addr) {
+ for (psf=im->sources; psf; psf=psf->sf_next) {
+ if (psf->sf_inaddr == src_addr)
+ break;
+ }
+ if (psf)
+ rv = psf->sf_count[MCAST_INCLUDE] ||
+ psf->sf_count[MCAST_EXCLUDE] !=
+ im->sfcount[MCAST_EXCLUDE];
+ else
+ rv = im->sfcount[MCAST_EXCLUDE] != 0;
+ } else
+ rv = 1;
}
read_unlock(&in_dev->lock);
return rv;
diff -ruN linux-2.4.25-pre7/net/ipv6/mcast.c linux-2.4.25-pre7F1/net/ipv6/mcast.c
--- linux-2.4.25-pre7/net/ipv6/mcast.c 2004-01-23 13:54:35.000000000 -0800
+++ linux-2.4.25-pre7F1/net/ipv6/mcast.c 2004-01-23 13:56:19.000000000 -0800
@@ -914,20 +914,24 @@
break;
}
if (mc) {
- struct ip6_sf_list *psf;
+ if (!ipv6_addr_any(src_addr)) {
+ struct ip6_sf_list *psf;
- spin_lock_bh(&mc->mca_lock);
- for (psf=mc->mca_sources; psf; psf=psf->sf_next) {
- if (ipv6_addr_cmp(&psf->sf_addr, src_addr) == 0)
- break;
- }
- if (psf)
- rv = psf->sf_count[MCAST_INCLUDE] ||
- psf->sf_count[MCAST_EXCLUDE] !=
- mc->mca_sfcount[MCAST_EXCLUDE];
- else
- rv = mc->mca_sfcount[MCAST_EXCLUDE] != 0;
- spin_unlock_bh(&mc->mca_lock);
+ spin_lock_bh(&mc->mca_lock);
+ for (psf=mc->mca_sources;psf;psf=psf->sf_next) {
+ if (ipv6_addr_cmp(&psf->sf_addr,
+ src_addr) == 0)
+ break;
+ }
+ if (psf)
+ rv = psf->sf_count[MCAST_INCLUDE] ||
+ psf->sf_count[MCAST_EXCLUDE] !=
+ mc->mca_sfcount[MCAST_EXCLUDE];
+ else
+ rv = mc->mca_sfcount[MCAST_EXCLUDE] !=0;
+ spin_unlock_bh(&mc->mca_lock);
+ } else
+ rv = 1; /* don't filter unspecified source */
}
read_unlock_bh(&idev->lock);
in6_dev_put(idev);
(See attached file: 2.4.25-pre7IGMP.patch)
2.4.25-pre7IGMP.patch
Description: Binary data
|