NetworkManager/src/core/tests/config
Lubomir Rintel 1f0d1d78d2 dns-manager: always apply options from [global-dns]
Currently, the use of [global-dns] section for setting DNS options is
conditioned on presence of a nameserver in a [global-dns-domain-*] section.
Attempt to use the section for options alone results in an error:

  [global-dns]
  options=timeout:1

Or via D-Bus API:

  # busctl set-property org.freedesktop.NetworkManager \
      /org/freedesktop/NetworkManager org.freedesktop.NetworkManager \
      GlobalDnsConfiguration 'a{sv}' 2 \
          "options" as 1 "timeout:1" \
          "domains" a{sv} 0
  ...
  Nov 24 13:15:21 zmok.local NetworkManager[501184]: <debug> [1669292121.3904]
      manager: set global DNS failed with error: Global
      DNS configuration is missing the default domain

The insistence on existence of [global-dns-domain-*] would make sense if
other [global-dns-domain-...] sections were present.

However, the user might only want to set the options in resolv.conf and
still use connection-provide nameservers for the actual resolving.

Lift the limitation by allowing the [global-dns] to be used alone, while
still insist on [global-dns-domain-*] being there in presence of other
domain-specific options.

https://bugzilla.redhat.com/show_bug.cgi?id=2019306
2023-01-26 09:02:16 +01:00
..
conf.d all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
bad.conf all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
global-dns-good.conf dns-manager: always apply options from [global-dns] 2023-01-26 09:02:16 +01:00
global-dns-invalid.conf all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
global-dns-options.conf dns-manager: always apply options from [global-dns] 2023-01-26 09:02:16 +01:00
meson.build all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
NetworkManager-warn.conf all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
NetworkManager.conf all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
NetworkManager.state all: move "src/" directory to "src/core/" 2021-02-04 09:45:55 +01:00
nm-test-device.c format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nm-test-device.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
test-config.c dns-manager: always apply options from [global-dns] 2023-01-26 09:02:16 +01:00