diff options
author | Felix Fietkau <nbd@nbd.name> | 2016-11-22 10:43:25 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2016-11-22 10:43:26 +0100 |
commit | 96c53518ffdd470768a224fbdb697294639a8370 (patch) | |
tree | 794e813083ad25d7f8ef6c9047fd49f27acac875 | |
parent | d51ce171c7588b3dbcfdfccfa8d2c5d5c9733e81 (diff) |
bridge: fix MAC address override on config reload
When no MAC address option is given, the MAC address of
bst->primary_port is used to override the bridge device address.
When the config changes and a new MAC address is provided in the config,
bridge_reset_primary needs to stop overriding it
Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r-- | bridge.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -655,6 +655,9 @@ bridge_reload(struct device *dev, struct blob_attr *attr) blobmsg_parse(bridge_attrs, __BRIDGE_ATTR_MAX, tb_br, blob_data(attr), blob_len(attr)); + if (tb_dev[DEV_ATTR_MACADDR]) + bst->primary_port = NULL; + bst->ifnames = tb_br[BRIDGE_ATTR_IFNAME]; device_init_settings(dev, tb_dev); bridge_apply_settings(bst, tb_br); |