Subject: Re: [Patch net-next v3 2/3] bridge: only expire the mdb entry when query is received

From: Cong Wang <[email-masked]>
Date: Thu, 09 May 2013 20:53:48 +0800

On Thu, 2013-05-09 at 13:15 +0800, Herbert Xu wrote:
> 
> Yes this looks about right.  BTW, for the groups-epcific queries
> you should use the leave timeout values and not the startup timeout
> values.
> 

Right, something like below:

diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index 11946a4..1e414ce 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1252,20 +1252,13 @@ static void br_multicast_leave_group(struct
net_bridge *br,
 
        if (br->multicast_querier &&
            !timer_pending(&br->multicast_querier_timer)) {
-               u32 sent;
-
                __br_multicast_send_query(br, port, &mp->addr);
-               sent = port ? port->multicast_startup_queries_sent :
-                             br->multicast_startup_queries_sent;
-               time = jiffies;
-               time += sent < br->multicast_startup_query_count ?
-                       br->multicast_startup_query_interval :
-                       br->multicast_query_interval;
-               mod_timer(port ? &port->multicast_query_timer :
-                                &br->multicast_query_timer, time);
 
                time = jiffies + br->multicast_last_member_count *
                                 br->multicast_last_member_interval;
+               mod_timer(port ? &port->multicast_query_timer :
+                                &br->multicast_query_timer, time);
+
                for (p = mlock_dereference(mp->ports, br);
                     p != NULL;
                     p = mlock_dereference(p->next, br)) {