diff mbox

[net-next,v5,2/3] bridge: only expire the mdb entry when query is received

Message ID 1371799901.32026.5.camel@cr0
State RFC, archived
Delegated to: David Miller
Headers show

Commit Message

Amerigo Wang June 21, 2013, 7:31 a.m. UTC
On Wed, 2013-06-19 at 12:44 +0800, Herbert Xu wrote:
> On Tue, Jun 18, 2013 at 02:03:38PM +0200, Linus Lüssing wrote:
> > Hi Amerigo,
> > 
> > I just tested these three patches on top of 3.10-rc6 (thanks for
> > looking into these issues so far!) but unfortunately I'm still
> > having problems if there is no querier on the link:
> > 
> > We will never discover a multicast listener which sends its
> > startup MLD reports before being attached to the bridge port.
> > 
> > I had reported that issue two months ago to Herbert's patch which
> > changed the querier default [1].
> > 
> > I guess in such a scenario where neither our querier is activated
> > nor could we detect any querier, then the only safe thing we can
> > do is to disable the bridge multicast snooping, isn't it?
> 
> If we have seen no queries then we should simply flood.  The fact
> that we don't currently is a bug.

Something like this?


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Herbert Xu June 21, 2013, 7:34 a.m. UTC | #1
On Fri, Jun 21, 2013 at 03:31:41PM +0800, Cong Wang wrote:
> On Wed, 2013-06-19 at 12:44 +0800, Herbert Xu wrote:
> > On Tue, Jun 18, 2013 at 02:03:38PM +0200, Linus Lüssing wrote:
> > > Hi Amerigo,
> > > 
> > > I just tested these three patches on top of 3.10-rc6 (thanks for
> > > looking into these issues so far!) but unfortunately I'm still
> > > having problems if there is no querier on the link:
> > > 
> > > We will never discover a multicast listener which sends its
> > > startup MLD reports before being attached to the bridge port.
> > > 
> > > I had reported that issue two months ago to Herbert's patch which
> > > changed the querier default [1].
> > > 
> > > I guess in such a scenario where neither our querier is activated
> > > nor could we detect any querier, then the only safe thing we can
> > > do is to disable the bridge multicast snooping, isn't it?
> > 
> > If we have seen no queries then we should simply flood.  The fact
> > that we don't currently is a bug.
> 
> Something like this?

Close, ideally we should allow for at least one timeout interval
after seeing the first query.

Thanks,
diff mbox

Patch

diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c
index 1b8b8b8..df49d14 100644
--- a/net/bridge/br_input.c
+++ b/net/bridge/br_input.c
@@ -105,6 +105,10 @@  int br_handle_frame_finish(struct sk_buff *skb)
                        if ((mdst && mdst->mglist) ||
                            br_multicast_is_router(br))
                                skb2 = skb;
+                       else if (hlist_empty(&br->router_list)) {
+                               unicast = false;
+                               goto flood;
+                       }
                        br_multicast_forward(mdst, skb, skb2);
                        skb = NULL;
                        if (!skb2)
@@ -121,6 +125,7 @@  int br_handle_frame_finish(struct sk_buff *skb)
                skb = NULL;
        }
 
+flood:
        if (skb) {
                if (dst) {
                        dst->used = jiffies;