netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] bridge: Don't insert unnecessary local fdb entry on changing mac address
@ 2016-06-07 10:14 Toshiaki Makita
  2016-06-07 11:13 ` Nikolay Aleksandrov via Bridge
  2016-06-08  7:33 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Toshiaki Makita @ 2016-06-07 10:14 UTC (permalink / raw)
  To: David S. Miller, Stephen Hemminger; +Cc: Nikolay Aleksandrov, netdev, bridge

The missing br_vlan_should_use() test caused creation of an unneeded
local fdb entry on changing mac address of a bridge device when there is
a vlan which is configured on a bridge port but not on the bridge
device.

Fixes: 2594e9064a57 ("bridge: vlan: add per-vlan struct and move to rhashtables")
Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
---
 net/bridge/br_fdb.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c
index dcea4f4..c18080a 100644
--- a/net/bridge/br_fdb.c
+++ b/net/bridge/br_fdb.c
@@ -279,6 +279,8 @@ void br_fdb_change_mac_address(struct net_bridge *br, const u8 *newaddr)
 	 * change from under us.
 	 */
 	list_for_each_entry(v, &vg->vlan_list, vlist) {
+		if (!br_vlan_should_use(v))
+			continue;
 		f = __br_fdb_get(br, br->dev->dev_addr, v->vid);
 		if (f && f->is_local && !f->dst)
 			fdb_delete_local(br, NULL, f);
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net] bridge: Don't insert unnecessary local fdb entry on changing mac address
  2016-06-07 10:14 [PATCH net] bridge: Don't insert unnecessary local fdb entry on changing mac address Toshiaki Makita
@ 2016-06-07 11:13 ` Nikolay Aleksandrov via Bridge
  2016-06-08  7:33 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Nikolay Aleksandrov via Bridge @ 2016-06-07 11:13 UTC (permalink / raw)
  To: Toshiaki Makita, David S. Miller, Stephen Hemminger; +Cc: netdev, bridge

On 06/07/2016 12:14 PM, Toshiaki Makita wrote:
> The missing br_vlan_should_use() test caused creation of an unneeded
> local fdb entry on changing mac address of a bridge device when there is
> a vlan which is configured on a bridge port but not on the bridge
> device.
> 
> Fixes: 2594e9064a57 ("bridge: vlan: add per-vlan struct and move to rhashtables")
> Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
> ---

Good catch,

Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net] bridge: Don't insert unnecessary local fdb entry on changing mac address
  2016-06-07 10:14 [PATCH net] bridge: Don't insert unnecessary local fdb entry on changing mac address Toshiaki Makita
  2016-06-07 11:13 ` Nikolay Aleksandrov via Bridge
@ 2016-06-08  7:33 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2016-06-08  7:33 UTC (permalink / raw)
  To: makita.toshiaki; +Cc: netdev, bridge, nikolay

From: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Date: Tue,  7 Jun 2016 19:14:17 +0900

> The missing br_vlan_should_use() test caused creation of an unneeded
> local fdb entry on changing mac address of a bridge device when there is
> a vlan which is configured on a bridge port but not on the bridge
> device.
> 
> Fixes: 2594e9064a57 ("bridge: vlan: add per-vlan struct and move to rhashtables")
> Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>

Applied and queued up for -stable, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-08  7:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-07 10:14 [PATCH net] bridge: Don't insert unnecessary local fdb entry on changing mac address Toshiaki Makita
2016-06-07 11:13 ` Nikolay Aleksandrov via Bridge
2016-06-08  7:33 ` David Miller

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).