lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 06 May 2013 11:24:13 +0800
From:	Cong Wang <amwang@...hat.com>
To:	Herbert Xu <herbert@...dor.hengli.com.au>
Cc:	netdev@...r.kernel.org,
	Stephen Hemminger <stephen@...workplumber.org>,
	"David S. Miller" <davem@...emloft.net>,
	Adam Baker <linux@...er-net.org.uk>
Subject: Re: [Patch net-next v3 2/3] bridge: only expire the mdb entry when
 query is received

On Fri, 2013-05-03 at 17:30 +0800, Herbert Xu wrote:
> On Fri, May 03, 2013 at 03:08:46PM +0800, Cong Wang wrote:
> > On Fri, 2013-05-03 at 12:01 +0800, Herbert Xu wrote:
> > > 
> > > I think I quoted the wrong hunk in the patch, I meant the code
> > > that arms the timer should no longer be in the leave_group function
> > > unless we just sent a query ourselves (and in that case the expiration
> > > should also be adjusted accordingly).
> > 
> > Is the following patch what you meant?
> 
> Right, but also add the corresponding timers in case we send a
> group-specific query since that won't loop back to ourselves.

Ok, then something like below , it is a delta patch, the first piece
should go to patch 3/3.

diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index d73276b..11946a4 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1263,6 +1263,24 @@ static void br_multicast_leave_group(struct
net_bridge *br,
 			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;
+		for (p = mlock_dereference(mp->ports, br);
+		     p != NULL;
+		     p = mlock_dereference(p->next, br)) {
+			if (p->port != port)
+				continue;
+
+			if (!hlist_unhashed(&p->mglist) &&
+			    (timer_pending(&p->timer) ?
+			     time_after(p->timer.expires, time) :
+			     try_to_del_timer_sync(&p->timer) >= 0)) {
+				mod_timer(&p->timer, time);
+			}
+
+			break;
+		}
 	}
 
 	if (port && (port->flags & BR_MULTICAST_FAST_LEAVE)) {
@@ -1298,24 +1316,6 @@ static void br_multicast_leave_group(struct
net_bridge *br,
 		     try_to_del_timer_sync(&mp->timer) >= 0)) {
 			mod_timer(&mp->timer, time);
 		}
-
-		goto out;
-	}
-
-	for (p = mlock_dereference(mp->ports, br);
-	     p != NULL;
-	     p = mlock_dereference(p->next, br)) {
-		if (p->port != port)
-			continue;
-
-		if (!hlist_unhashed(&p->mglist) &&
-		    (timer_pending(&p->timer) ?
-		     time_after(p->timer.expires, time) :
-		     try_to_del_timer_sync(&p->timer) >= 0)) {
-			mod_timer(&p->timer, time);
-		}
-
-		break;
 	}
 
 out:

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ