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>
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);