Fix behavior when writing MAC address is disabled

Current code only doesn't write MAC address to systemd-network config
file, the behavior of writing MAC address on DBus remains the same.
Writing the MAC address on DBus can be successfully performed and the
value is changed. Though writing MAC address will reload DBus values
from systemd-network config, applications will read wrong MAC address
from DBus during the time before it reloads. And when compiled with
uboot-env=true, it still updates the MAC address in uboot env.

This patch resolves such issue by simply gives a NotAllowed error when
writing MAC address is disabled.

Tested:
Build with persist-mac=false
* Writing MAC address on DBus gives NotAllowed error.
* Updating MAC address from Redfish and IPMI returns error.

Change-Id: I32a81fe5ddac0c02209a785c6d595fdaf2456e3e
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
1 file changed
tree: 819025e003c4c1565134dcd397820094153fe81a
  1. docs/
  2. gen/
  3. src/
  4. subprojects/
  5. test/
  6. yaml/
  7. .clang-format
  8. .gitignore
  9. .shellcheck
  10. LICENSE
  11. MAINTAINERS
  12. meson.build
  13. meson_options.txt
  14. OWNERS
  15. README.md
  16. xyz.openbmc_project.Network.conf.in
  17. xyz.openbmc_project.Network.service.in
README.md

To Build

To build this package, do the following steps:

    1. meson build
    2. ninja -C build