diff mbox

[net-next,3/3] bridge: send query as soon as leave is received

Message ID 1367220392-17496-3-git-send-email-amwang@redhat.com
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Amerigo Wang April 29, 2013, 7:26 a.m. UTC
From: Cong Wang <amwang@redhat.com>

Continue sending queries when leave is received if the user marks
it as a querier.

Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Adam Baker <linux@baker-net.org.uk>
Signed-off-by: Cong Wang <amwang@redhat.com>
---
 net/bridge/br_multicast.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

Comments

Herbert Xu April 29, 2013, 7:43 a.m. UTC | #1
On Mon, Apr 29, 2013 at 03:26:32PM +0800, Cong Wang wrote:
> From: Cong Wang <amwang@redhat.com>
> 
> Continue sending queries when leave is received if the user marks
> it as a querier.

If we're going to send a query on leave it should be group-specific
and not general.

Thanks,
Amerigo Wang April 29, 2013, 8:15 a.m. UTC | #2
On Mon, 2013-04-29 at 15:43 +0800, Herbert Xu wrote:
> On Mon, Apr 29, 2013 at 03:26:32PM +0800, Cong Wang wrote:
> > From: Cong Wang <amwang@redhat.com>
> > 
> > Continue sending queries when leave is received if the user marks
> > it as a querier.
> 
> If we're going to send a query on leave it should be group-specific
> and not general.
> 

Right, I will fix it.


--
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
diff mbox

Patch

diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index a821a4e..03a8f2b 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1246,6 +1246,17 @@  static void br_multicast_leave_group(struct net_bridge *br,
 	if (!mp)
 		goto out;
 
+	if (br->multicast_querier) {
+		mod_timer(&br->multicast_query_timer, jiffies);
+		list_for_each_entry(port, &br->port_list, list) {
+			if (port->state == BR_STATE_DISABLED ||
+			    port->state == BR_STATE_BLOCKING)
+				continue;
+
+			__br_multicast_enable_port(port);
+		}
+	}
+
 	if (port && (port->flags & BR_MULTICAST_FAST_LEAVE)) {
 		struct net_bridge_port_group __rcu **pp;