netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Willy Tarreau <willy@w.ods.org>
To: David Stevens <dlstevens@us.ibm.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	Yan Zheng <yzcorp@gmail.com>,
	Marcelo Tosatti <marcelo.tosatti@cyclades.com>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH][MCAST]IPv6: small fix for ip6_mc_msfilter(...)
Date: Wed, 2 Nov 2005 10:29:59 +0100	[thread overview]
Message-ID: <20051102092959.GA15515@alpha.home.local> (raw)
In-Reply-To: <OF0C913512.B3EB99A5-ON882570AD.0025FB9D-882570AD.00276427@us.ibm.com>

On Tue, Nov 01, 2005 at 11:10:29PM -0800, David Stevens wrote:
> Willy Tarreau <willy@w.ods.org> wrote on 11/01/2005 09:47:02 PM:
> 
> > Hi,
> > 
> > On Tue, Nov 01, 2005 at 06:37:43PM +0800, Yan Zheng wrote:
> > > You can reproduce this bug by follow codes. This program will cause a
> > > change to include report even though the first socket's filter mode is
> > > exclude.
> > 
> > I've not clearly understood the nature of the bug, does it also
> > affect 2.4 ? Marcelo will be releasing 2.4.32 in a few days, so
> > it would be wise to merge the fix soon.
> > 
> > Regards,
> > Willy
> > 
> 
>         Yes.
>  
>         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.
>         But having the fix in is better than having it broken, even
> for that case. :-)


OK, thanks for the clarification, I understand better now :-)

Marcelo, David, does this backport seem appropriate for 2.4.32 ? I verified
that it compiles, nothing more. If it's OK, I've noticed another patch that
Yan posted today and which might be of interest before a very solid release.

Regards,
Willy

diff -urN linux-2.4.32-rc2/net/ipv4/igmp.c linux-2.4.32-rc2-mcast/net/ipv4/igmp.c
--- linux-2.4.32-rc2/net/ipv4/igmp.c	2005-11-02 10:16:03.000000000 +0100
+++ linux-2.4.32-rc2-mcast/net/ipv4/igmp.c	2005-11-02 10:20:33.000000000 +0100
@@ -1876,8 +1876,11 @@
 			sock_kfree_s(sk, newpsl, IP_SFLSIZE(newpsl->sl_max));
 			goto done;
 		}
-	} else
-		newpsl = 0;
+	} 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,
diff -urN linux-2.4.32-rc2/net/ipv6/mcast.c linux-2.4.32-rc2-mcast/net/ipv6/mcast.c
--- linux-2.4.32-rc2/net/ipv6/mcast.c	2005-11-02 10:16:03.000000000 +0100
+++ linux-2.4.32-rc2-mcast/net/ipv6/mcast.c	2005-11-02 10:21:49.000000000 +0100
@@ -505,8 +505,11 @@
 			sock_kfree_s(sk, newpsl, IP6_SFLSIZE(newpsl->sl_max));
 			goto done;
 		}
-	} else
-		newpsl = 0;
+	} 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,

  reply	other threads:[~2005-11-02  9:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-31  2:52 [PATCH][MCAST]IPv6: small fix for ip6_mc_msfilter(...) Yan Zheng
2005-11-01 10:37 ` Yan Zheng
2005-11-02  5:47   ` Willy Tarreau
2005-11-02  7:10     ` David Stevens
2005-11-02  9:29       ` Willy Tarreau [this message]
2005-11-02 13:41         ` Marcelo Tosatti
2005-11-02 21:31           ` [PATCH-2.4][MCAST]IPv6: " Willy Tarreau
2005-11-02 17:42         ` [PATCH][MCAST]IPv6: " David Stevens
2005-11-02 20:59           ` Marcelo Tosatti
2005-11-03  5:02             ` Willy Tarreau
2005-11-02 21:46           ` Arnaldo Carvalho de Melo
2005-11-01 21:27 ` David Stevens
2005-11-01 23:49   ` Yan Zheng
2005-11-01 23:55     ` David Stevens
2005-11-02 21:45       ` Arnaldo Carvalho de Melo
2005-11-02 21:55     ` Arnaldo Carvalho de Melo
2005-11-02 23:28       ` Yan Zheng
2005-11-02 23:28         ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051102092959.GA15515@alpha.home.local \
    --to=willy@w.ods.org \
    --cc=davem@davemloft.net \
    --cc=dlstevens@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.com \
    --cc=netdev@vger.kernel.org \
    --cc=yzcorp@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).