Commit a3ebb7ef authored by Toshiaki Makita's avatar Toshiaki Makita Committed by David S. Miller

bridge: Fix the way to find old local fdb entries in br_fdb_change_mac_address

We have been always failed to delete the old entry at
br_fdb_change_mac_address() because br_set_mac_address() updates
dev->dev_addr before calling br_fdb_change_mac_address() and
br_fdb_change_mac_address() uses dev->dev_addr to find the old entry.

That update of dev_addr is completely unnecessary because the same work
is done in br_stp_change_bridge_id() which is called right away after
calling br_fdb_change_mac_address().
Signed-off-by: default avatarToshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Acked-by: default avatarVlad Yasevich <vyasevic@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2836882f
...@@ -187,8 +187,8 @@ static int br_set_mac_address(struct net_device *dev, void *p) ...@@ -187,8 +187,8 @@ static int br_set_mac_address(struct net_device *dev, void *p)
spin_lock_bh(&br->lock); spin_lock_bh(&br->lock);
if (!ether_addr_equal(dev->dev_addr, addr->sa_data)) { if (!ether_addr_equal(dev->dev_addr, addr->sa_data)) {
memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);
br_fdb_change_mac_address(br, addr->sa_data); br_fdb_change_mac_address(br, addr->sa_data);
/* Mac address will be changed in br_stp_change_bridge_id(). */
br_stp_change_bridge_id(br, addr->sa_data); br_stp_change_bridge_id(br, addr->sa_data);
} }
spin_unlock_bh(&br->lock); spin_unlock_bh(&br->lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment