Allow unset default gateway

Default gateway addresses cannot be unset in current implementation as
it requires a valid IP address and writes it to systemd.network files
every time. This patch supports setting empty string on DefaultGateway
and DefaultGateway6 DBus properties to unset the value as empty strings
will not be written to config file.

Tested:
Disable DHCP and set default gateway for both IPv4 and IPv6, then set
empty string on DefaultGateway and/or DefaultGateway6, verified the
corresponding [Route] section is removed in config file.

Change-Id: I3be81f9c7c605b12cb225beeefec02f9841b0dcd
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
3 files changed
tree: e0abfcfa0744fc8c2f305e844be6221603e82f8b
  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