bridge: make bridge address settings sticky
Normally, the bridge just chooses the smallest mac address as the bridge id and mac address of bridge device. But if the administrator has explictly set the interface address then don't change it. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
43aa192011
commit
92c0574f11
@@ -87,6 +87,7 @@ static int br_set_mac_address(struct net_device *dev, void *p)
|
||||
spin_lock_bh(&br->lock);
|
||||
memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);
|
||||
br_stp_change_bridge_id(br, addr->sa_data);
|
||||
br->flags |= BR_SET_MAC_ADDR;
|
||||
spin_unlock_bh(&br->lock);
|
||||
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user