From: lzwind <100665065+lzwind@users.noreply.github.com> Date: Tue, 28 Jul 2026 12:35:25 +0000 (+0800) Subject: network: document that Domains= may be specified more than once (#43194) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b76949a476319ab86efe8d86e1f72b624421e27;p=thirdparty%2Fsystemd.git network: document that Domains= may be specified more than once (#43194) The `Domains=` option in the `[Network]` section did not document its behaviour when specified repeatedly. In practice the option is additive (each occurrence accumulates search/routing domains) and assigning an empty string resets the list, matching the closely related `DNS=` option. This is implemented by `config_parse_domains()` in `src/network/networkd-dns.c`, which frees both the search and route domain sets on an empty `rvalue` and otherwise inserts each whitespace-separated entry into the corresponding set. Document this explicitly, using the same wording already used for `DNS=` in the same man page, so users know repeated assignments are combined and that an empty value clears them. Fixes #38740. --- diff --git a/man/systemd.network.xml b/man/systemd.network.xml index 1e4f2df49fa..1893c604048 100644 --- a/man/systemd.network.xml +++ b/man/systemd.network.xml @@ -838,6 +838,9 @@ DuplicateAddressDetection=none Domain name routing has no equivalent in the traditional glibc API, which has no concept of domain name servers limited to a specific link. + This option may be specified more than once. If an empty string is assigned, + then the all previous assignments are cleared. +