]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: document that Domains= may be specified more than once (#43194)
authorlzwind <100665065+lzwind@users.noreply.github.com>
Tue, 28 Jul 2026 12:35:25 +0000 (20:35 +0800)
committerGitHub <noreply@github.com>
Tue, 28 Jul 2026 12:35:25 +0000 (21:35 +0900)
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.

man/systemd.network.xml

index 1e4f2df49fa352606988cc362e744514be2d93c6..1893c604048c0141c9cd8961ee62e32cb9190faf 100644 (file)
@@ -838,6 +838,9 @@ DuplicateAddressDetection=none</programlisting></para>
           Domain name routing has no equivalent in the traditional glibc API, which has no concept of
           domain name servers limited to a specific link.</para>
 
+          <para>This option may be specified more than once. If an empty string is assigned,
+          then the all previous assignments are cleared.</para>
+
           <xi:include href="version-info.xml" xpointer="v216"/>
         </listitem>
       </varlistentry>