[PATCH net] bridge: Don't insert unnecessary local fdb entry on changing mac address

Subsystems: ethernet bridge, networking [general], the rest

STALE3710d

3 messages, 3 authors, 2016-06-08 · open the first message on its own page

[PATCH net] bridge: Don't insert unnecessary local fdb entry on changing mac address

From: Toshiaki Makita <hidden>
Date: 2016-06-07 10:14:17

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 <redacted>
---
 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

Re: [PATCH net] bridge: Don't insert unnecessary local fdb entry on changing mac address

From: Nikolay Aleksandrov via Bridge <hidden>
Date: 2016-06-07 11:13:23

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 <redacted>
---
Good catch,

Acked-by: Nikolay Aleksandrov <redacted>

Re: [PATCH net] bridge: Don't insert unnecessary local fdb entry on changing mac address

From: David Miller <davem@davemloft.net>
Date: 2016-06-08 07:33:11

From: Toshiaki Makita <redacted>
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 <redacted>
Applied and queued up for -stable, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help