From 9b76949a476319ab86efe8d86e1f72b624421e27 Mon Sep 17 00:00:00 2001 From: lzwind <100665065+lzwind@users.noreply.github.com> Date: Tue, 28 Jul 2026 20:35:25 +0800 Subject: [PATCH] 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. --- man/systemd.network.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/man/systemd.network.xml b/man/systemd.network.xml index 1e4f2df49f..1893c60404 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. +