summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorToshiaki Makita <makita.toshiaki@lab.ntt.co.jp>2016-06-07 19:14:17 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-06-24 10:22:01 -0700
commitdf181e8442068b5914cc1b102c1ce68985d9a95a (patch)
tree75d6a1e74cf5a828e8c1852fc84afea96aa45096 /net
parent1a5a4a9d96c9cd97bbcdc54ccaf410c0f93877b2 (diff)
downloadlinux-stable-df181e8442068b5914cc1b102c1ce68985d9a95a.tar.gz
linux-stable-df181e8442068b5914cc1b102c1ce68985d9a95a.tar.bz2
linux-stable-df181e8442068b5914cc1b102c1ce68985d9a95a.zip
bridge: Don't insert unnecessary local fdb entry on changing mac address
[ Upstream commit 0b148def403153a4d1565f1640356cb78ce5109f ] 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> Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/bridge/br_fdb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c
index dcea4f4c62b3..c18080ad4085 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);