netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cong Wang <amwang@redhat.com>
To: Herbert Xu <herbert@gondor.hengli.com.au>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	netdev@vger.kernel.org, bridge@lists.linux-foundation.org,
	"David S. Miller" <davem@davemloft.net>,
	Adam Baker <linux@baker-net.org.uk>
Subject: Re: [Patch net] bridge: do not expire mdb entry when bridge still uses it
Date: Fri, 08 Mar 2013 12:06:53 +0800	[thread overview]
Message-ID: <1362715613.9773.29.camel@cr0> (raw)
In-Reply-To: <20130308024726.GA27319@gondor.apana.org.au>

On Fri, 2013-03-08 at 10:47 +0800, Herbert Xu wrote:
> On Fri, Mar 08, 2013 at 10:44:06AM +0800, Cong Wang wrote:
> >
> > This is a good question. It is due to inside br_handle_frame_finish() we
> > use 'skb2' to decide if we deliver packets to bridge itself, and in this
> > case 'skb2' is non-NULL only when:
> > 
> >                 if (mdst || BR_INPUT_SKB_CB_MROUTERS_ONLY(skb)) {
> >                         if ((mdst && mdst->mglist) ||
> >                             br_multicast_is_router(br))
> >                                 skb2 = skb; //        <======== HERE
> >                         br_multicast_forward(mdst, skb, skb2);
> > 
> > For other ports, br_multicast_forward() will always forward 'skb' to
> > them.
> 
> Yes but the point is that other ports should also expire after the
> timeout and thus be removed from mdst.  So why is this only happening
> for the bridge aka mdst->mglist?

The mdst may be removed, however the BR_INPUT_SKB_CB_MROUTERS_ONLY(skb)
is still set, because in br_multicast_ipv4_rcv():

        if (iph->protocol != IPPROTO_IGMP) {
                if ((iph->daddr & IGMP_LOCAL_GROUP_MASK) !=
IGMP_LOCAL_GROUP)
                        BR_INPUT_SKB_CB(skb)->mrouters_only = 1;
                return 0;
        }

  reply	other threads:[~2013-03-08  4:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-08  2:07 [Patch net] bridge: do not expire mdb entry when bridge still uses it Cong Wang
2013-03-08  2:31 ` Herbert Xu
2013-03-08  2:44   ` Cong Wang
2013-03-08  2:47     ` Herbert Xu
2013-03-08  4:06       ` Cong Wang [this message]
2013-03-08  4:08         ` Herbert Xu
2013-03-08  7:26           ` Cong Wang
2013-03-08 11:24             ` Herbert Xu
2013-03-11  1:44               ` Cong Wang
2013-03-19  1:12                 ` Cong Wang
2013-03-09 22:46 ` Adam Baker

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=1362715613.9773.29.camel@cr0 \
    --to=amwang@redhat.com \
    --cc=bridge@lists.linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.hengli.com.au \
    --cc=linux@baker-net.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /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).