diff --git a/man/org.freedesktop.resolve1.xml b/man/org.freedesktop.resolve1.xml
index 6a6d9de6b9..b06155662a 100644
--- a/man/org.freedesktop.resolve1.xml
+++ b/man/org.freedesktop.resolve1.xml
@@ -156,12 +156,6 @@ node /org/freedesktop/resolve1 {
};
-
-
-
-
-
-
@@ -170,28 +164,8 @@ node /org/freedesktop/resolve1 {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -281,26 +255,28 @@ node /org/freedesktop/resolve1 {
Methods
- ResolveHostname() takes a hostname and resolves it to one or more IP addresses.
- As parameters it takes the Linux network interface index to execute the query on, or 0 if it may be
- done on any suitable interface. The name parameter specifies the hostname to
- resolve. Note that if required, IDNA conversion is applied to this name unless it is resolved via LLMNR or MulticastDNS. The family parameter
- limits the results to a specific address family. It may be AF_INET,
- AF_INET6 or AF_UNSPEC. If AF_UNSPEC is specified (recommended), both kinds are retrieved, subject
- to local network configuration (i.e. if no local, routable IPv6 address is found, no IPv6 address is
- retrieved; and similarly for IPv4). A 64-bit flags field may be used to alter the
- behaviour of the resolver operation (see below). The method returns an array of address records. Each
- address record consists of the interface index the address belongs to, an address family as well as a
- byte array with the actual IP address data (which either has 4 or 16 elements, depending on the address
- family). The returned address family will be one of AF_INET or
- AF_INET6. For IPv6, the returned address interface index should be used to
- initialize the .sin6_scope_id field of a struct sockaddr_in6 instance to permit
- support for resolution to link-local IP addresses. The address array is followed by the canonical name
- of the host, which may or may not be identical to the resolved hostname. Finally, a 64-bit
- flags field is returned that is defined similarly to the flags
- field that was passed in, but contains information about the resolved data (see below). If the hostname
- passed in is an IPv4 or IPv6 address formatted as string, it is parsed, and the result is returned. In
- this case, no network communication is done.
+ ResolveHostname() takes a hostname and resolves it to one or more IP
+ addresses. As parameters it takes the Linux network interface index to execute the query on, or 0 if
+ it may be done on any suitable interface. The name parameter specifies the hostname
+ to resolve. Note that if required, IDNA conversion is applied to this name unless it is resolved via
+ LLMNR or MulticastDNS. The family parameter limits the results to a specific address
+ family. It may be AF_INET, AF_INET6 or
+ AF_UNSPEC. If AF_UNSPEC is specified (recommended), both
+ kinds are retrieved, subject to local network configuration (i.e. if no local, routable IPv6 address is
+ found, no IPv6 address is retrieved; and similarly for IPv4). A 64-bit flags field
+ may be used to alter the behaviour of the resolver operation (see below). The method returns an array
+ of address records. Each address record consists of the interface index the address belongs to, an
+ address family as well as a byte array with the actual IP address data (which either has 4 or 16
+ elements, depending on the address family). The returned address family will be one of
+ AF_INET or AF_INET6. For IPv6, the returned address interface
+ index should be used to initialize the .sin6_scope_id field of a
+ struct sockaddr_in6 instance to permit support for resolution to link-local IP
+ addresses. The address array is followed by the canonical name of the host, which may or may not be
+ identical to the resolved hostname. Finally, a 64-bit flags field is returned that
+ is defined similarly to the flags field that was passed in, but contains information
+ about the resolved data (see below). If the hostname passed in is an IPv4 or IPv6 address formatted as
+ string, it is parsed, and the result is returned. In this case, no network communication is
+ done.ResolveAddress() executes the reverse operation: it takes an IP address and
acquires one or more hostnames for it. As parameters it takes the interface index to execute the query
@@ -387,15 +363,19 @@ node /org/freedesktop/resolve1 {
AF_INET6), followed by a 4-byte or 16-byte array with the raw address data. This
method is a one-step shortcut for retrieving the Link object for a network interface using
GetLink() (see above) and then invoking the SetDNS() method
- (see below) on it.
+ (see below) on it.
+
+ SetLinkDNSEx() is similar to SetLinkDNS(), but allows
+ an IP port (instead of the default 53) and DNS name to be specified for each DNS server. The server
+ name is used for Server Name Indication (SNI), which is useful when DNS-over-TLS is
+ used. C.f. DNS= in
+ resolved.conf5.
- Network management software integrating with systemd-resolved should
- call this method (and the five below) after the interface appeared in the kernel (and thus after a
- network interface index has been assigned), but before the network interfaces is activated
- (IFF_UP set) so that all settings take effect during the full time the network
- interface is up. It is safe to alter settings while the interface is up, however. Use
- RevertLink() (described below) to reset all per-interface settings.
+ SetLinkDefaultRoute() specifies whether the link shall be used as the
+ default route for name queries. See the description of name routing in
+ systemd-resolved.service8
+ for details.The SetLinkDomains() method sets the search and routing domains to use on a
specific network interface for DNS look-ups. It takes a network interface index and an array of domains,
@@ -432,8 +412,22 @@ node /org/freedesktop/resolve1 {
Negative Trust Anchors (NTAs) for a specific network interface. It takes a network interface index and a
list of domains as arguments.
- The RevertLink() method may be used to revert all per-link settings done with
- the six methods described above to the defaults again.
+ The SetLinkDNSOverTLS() method enables or disables DNS-over-TLS.
+ C.f. DNSOverTLS= in
+ systemd-resolved.service8
+ for details.
+
+ Network management software integrating with systemd-resolved should call
+ SetLinkDNS() or SetLinkDNSEx(),
+ SetLinkDefaultRoute(), SetLinkDomains() and others after the
+ interface appeared in the kernel (and thus after a network interface index has been assigned), but
+ before the network interfaces is activated (IFF_UP set) so that all settings take
+ effect during the full time the network interface is up. It is safe to alter settings while the
+ interface is up, however. Use RevertLink() (described below) to reset all
+ per-interface settings.
+
+ The RevertLink() method may be used to revert all per-link settings
+ described above to the defaults.The Flags Parameter
@@ -458,11 +452,11 @@ node /org/freedesktop/resolve1 {
classic unicast DNS, LLMNR via IPv4/UDP and IPv6/UDP respectively, as well as MulticastDNS via
IPv4/UDP and IPv6/UDP. If all of these five bits are off on input (which is strongly recommended) the
look-up will be done via all suitable protocols for the specific look-up. Note that these flags
- operate as filter only, but cannot force a look-up to be done via a protocol. Specifically, systemd-resolved
- will only route look-ups within the .local TLD to MulticastDNS (plus some reverse look-up address
- domains), and single-label names to LLMNR (plus some reverse address lookup domains). It will route
- neither of these to Unicast DNS servers. Also, it will do LLMNR and Multicast DNS only on interfaces
- suitable for multicast.
+ operate as filter only, but cannot force a look-up to be done via a protocol. Specifically,
+ systemd-resolved will only route look-ups within the .local TLD to MulticastDNS
+ (plus some reverse look-up address domains), and single-label names to LLMNR (plus some reverse
+ address lookup domains). It will route neither of these to Unicast DNS servers. Also, it will do
+ LLMNR and Multicast DNS only on interfaces suitable for multicast.
On output, these five flags indicate which protocol was used to execute the operation, and hence
where the data was found.
@@ -498,34 +492,50 @@ node /org/freedesktop/resolve1 {
the data is "rightfully" unauthenticated (which includes cases where the underlying protocol or server
does not support authenticating data).
-
-
+
Properties
+ The LLMNR and MulticastDNS properties report whether LLMNR
+ and MulticastDNS are (globally) enabled. Each may be one of yes,
+ no, and resolve. See SetLinkLLMNR()
+ and SetLinkMulticastDNS() above.
+
LLMNRHostname contains the hostname currently exposed on the network via
LLMNR. It usually follows the system hostname as may be queried via
gethostname3,
but may differ if a conflict is detected on the network.
- DNS contains an array of all DNS servers currently used by
- systemd-resolved. It contains similar information as the DNS server data written to
- /run/systemd/resolve/resolv.conf. Each structure in the array consists of a numeric network interface
- index, an address family, and a byte array containing the DNS server address (either 4 bytes in length
- for IPv4 or 16 bytes in lengths for IPv6). The array contains DNS servers configured system-wide,
- including those possibly read from a foreign /etc/resolv.conf or the
- DNS= setting in /etc/systemd/resolved.conf, as well as
- per-interface DNS server information either retrieved from
+ DNS and DNSEx contain arrays of all DNS servers currently
+ used by systemd-resolved. DNS contains information similar to
+ the DNS server data in /run/systemd/resolve/resolv.conf. Each structure in the
+ array consists of a numeric network interface index, an address family, and a byte array containing the
+ DNS server address (either 4 bytes in length for IPv4 or 16 bytes in lengths for IPv6).
+ DNSEx is similar, but additionally contains the IP port and server name (used for
+ Server Name Indication, SNI). Both arrays contain DNS servers configured system-wide, including those
+ possibly read from a foreign /etc/resolv.conf or the DNS=
+ setting in /etc/systemd/resolved.conf, as well as per-interface DNS server
+ information either retrieved from
systemd-networkd8,
- or configured by external software via SetLinkDNS() (see above). The network
- interface index will be 0 for the system-wide configured services and non-zero for the per-link
- servers.
+ or configured by external software via SetLinkDNS() or
+ SetLinkDNSEx() (see above). The network interface index will be 0 for the
+ system-wide configured services and non-zero for the per-link servers.
- Similarly, the Domains property contains an array of all search and
- routing domains currently used by systemd-resolved. Each entry consists of a network interface index (again, 0
- encodes system-wide entries), the actual domain name, and whether the entry is used only for routing
- (true) or for both routing and searching (false).
+ FallbackDNS and FallbackDNSEx contain arrays of all DNS
+ servers configured as fallback servers, if any, using the same format as DNS and
+ DNSEx described above. See the description of FallbackDNS= in
+ resolved.conf5 for
+ the description of when those servers are used.
+
+ CurrentDNSServer and CurrentDNSServerEx specify the server
+ that is currently used for query resolution, in the same format as a single entry in the
+ DNS and DNSEx arrays described above.
+
+ Similarly, the Domains property contains an array of all search and routing
+ domains currently used by systemd-resolved. Each entry consists of a network
+ interface index (again, 0 encodes system-wide entries), the actual domain name, and whether the entry
+ is used only for routing (true) or for both routing and searching (false).The TransactionStatistics property contains information about the number of
transactions systemd-resolved has processed. It contains a pair of unsigned 64-bit counters, the first
@@ -540,7 +550,14 @@ node /org/freedesktop/resolve1 {
operations so far. It exposes three 64-bit counters: the first being the total number of current cache
entries (both positive and negative), the second the number of cache hits, and the third the number of
cache misses. The latter counters may be reset using ResetStatistics() (see
- above).
+ above).
+
+ The DNSSEC property specifies current status of DNSSEC validation. It is one
+ of yes (validation is enforced), no (no validation is done),
+ allow-downgrade (validation is done if the current DNS server supports it). See the
+ description of DNSSEC= in
+ resolved.conf5.
+ The DNSSECStatistics property contains information about the DNSSEC
validations executed so far. It contains four 64-bit counters: the number of secure, insecure, bogus,
@@ -559,12 +576,20 @@ node /org/freedesktop/resolve1 {
DNSSEC is supported by DNS servers until it verifies that this is not the case. Thus, the reported
value may initially be true, until the first transactions are executed.
+ The DNSOverTLS boolean property reports whether DNS-over-TLS is enabled.
+
+
The ResolvConfMode property exposes how /etc/resolv.conf
is managed on the host. Currently, the values uplink, stub,
static (these three correspond to the three different files
systemd-resolved.service provides), foreign (the file is
managed by admin or another service, systemd-resolved.service just consumes it),
missing (/etc/resolv.conf is missing).
+
+ The DNSStubListener property reports whether the stub listener on port 53 is
+ enabled. Possible values are yes (enabled), no (disabled),
+ udp (only the UDP listener is enabled), and tcp (only the TCP
+ listener is enabled).
@@ -619,40 +644,6 @@ node /org/freedesktop/resolve1/link/_1 {
};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -721,8 +712,13 @@ node /org/freedesktop/resolve1/link/_1 {
SetLinkDNS() on the Manager object, the main difference being that the later
expects an interface index to be specified. Invoking the methods on the Manager interface has the
benefit of reducing roundtrips, as it is not necessary to first request the Link object path via
- GetLink() before invoking the methods. For further details on these methods see
- the Manager documentation above.
+ GetLink() before invoking the methods. The same relationship holds for
+ SetDNSEx(), SetDomains(),
+ SetDefaultRoute(), SetLLMNR(),
+ SetMulticastDNS(), SetDNSOverTLS(),
+ SetDNSSEC(), SetDNSSECNegativeTrustAnchors(), and
+ Revert(). For further details on these methods see the
+ Manager documentation above.
@@ -744,8 +740,12 @@ node /org/freedesktop/resolve1/link/_1 {
assumed available until it is detected that the configured server does not actually support it. Thus,
this property may initially report that DNSSEC is supported on an interface.
+ DefaultRoute exposes a boolean field that indicates whether the interface will
+ be used as default route for name queries. See SetLinkDefaultRoute() above.
+
The other properties reflect the state of the various configuration settings for the link which
- may be set with the various methods calls such as SetDNS() or SetLLMNR().
+ may be set with the various methods calls such as SetDNS() or
+ SetLLMNR().
diff --git a/man/systemd-resolved.service.xml b/man/systemd-resolved.service.xml
index 6137a6d836..8f3494e36b 100644
--- a/man/systemd-resolved.service.xml
+++ b/man/systemd-resolved.service.xml
@@ -87,17 +87,17 @@
Synthetic Records
- systemd-resolved synthesizes DNS resource records (RRs) for the following
+ systemd-resolved synthetizes DNS resource records (RRs) for the following
cases:The local, configured hostname is resolved to all locally configured IP addresses
ordered by their scope, or — if none are configured — the IPv4 address 127.0.0.2 (which is on the local
- loopback) and the IPv6 address ::1 (which is the local host).
+ loopback interface) and the IPv6 address ::1 (which is the local host).The hostnames localhost and localhost.localdomain
- (as well as any hostname ending in .localhost or
- .localhost.localdomain) are resolved to the IP addresses 127.0.0.1 and ::1.
+ as well as any hostname ending in .localhost or
+ .localhost.localdomain are resolved to the IP addresses 127.0.0.1 and ::1.
The hostname _gateway is resolved to all current default routing
@@ -119,104 +119,162 @@
according to the following rules:
- Names for which synthetic records are generated (as listed in the previous section) are
- never routed to the network and a reply is sent immediately. In particular this means that lookups for
- localhost are never routed to the network.
+ Names for which synthetic records are generated (the local hostname,
+ localhost and localdomain, local gateway, as listed in the
+ previous section) and addresses configured in /etc/hosts are never routed to the
+ network and a reply is sent immediately.
- Single-label names are routed to all local interfaces capable of IP multicasting, where
- LLMNR is not disabled, using the LLMNR protocol. Lookups for IPv4 addresses are only sent via LLMNR on
- IPv4, and lookups for IPv6 addresses are only sent via LLMNR on IPv6. Lookups for the locally
- configured hostname and the _gateway hostname are never routed to LLMNR.
-
+ Single-label names are resolved using LLMNR on all local interfaces where LLMNR is
+ enabled. Lookups for IPv4 addresses are only sent via LLMNR on IPv4, and lookups for IPv6 addresses are
+ only sent via LLMNR on IPv6. Note that lookups for single-label synthetized names are not routed to
+ LLMNR, MulticastDNS or unicast DNS.
- Multi-label names with the domain suffix .local are routed to all
- local interfaces capable of IP multicasting, where MulticastDNS is not disabled, using the MulticastDNS
- protocol. As with LLMNR, IPv4 address lookups are sent via IPv4 and IPv6 address lookups are sent via
- IPv6.
+ Queries for the address records (A and AAAA) of single-label non-synthetized names are
+ resolved via unicast DNS using search domains. For any interface which defines search domains, such
+ look-ups are routed to that interface, suffixed with each of the search domains defined on that
+ interface in turn. When global search domains are defined, such look-ups are routed to all interfaces,
+ suffixed by each of the global search domains in turn. Additionally, lookup of single-label names via
+ unicast DNS may be enabled with the ResolveUnicastSingleLabel=yes setting. The
+ details of which servers are queried and how the final reply is chosen are described below. Note that
+ this means that address queries for single-label names are never sent out to remote DNS servers by
+ default, and resoulution is only possible if search domains are defined.
- Resolution of address records (A and AAAA) via unicast DNS (i.e. not LLMNR or
- MulticastDNS) for non-synthesized single-label names is allowed for non-top-level domains. This means
- that such records can be resolved when search domains are defined. For any interface which defines
- search domains, such look-ups are routed to that interface, suffixed with each of the search domains
- defined on that interface in turn. When global search domains are defined, such look-ups are routed to
- all interfaces, suffixed by each of the global search domains in turn. Additionally, lookup of
- single-label names via unicast DNS may be enabled with the
- ResolveUnicastSingleLabel=yes setting. The details of which servers are queried and
- how the final reply is chosen are described below. Note that this means that address queries for
- single-label names are never sent out to remote DNS servers by default, and if no search domains are
- defined, resolution will fail.
+ Multi-label names with the domain suffix .local are resolved using
+ MulticastDNS on all local interfaces where MulticastDNS is enabled. As with LLMNR, IPv4 address lookups
+ are sent via IPv4 and IPv6 address lookups are sent via IPv6.
- Other multi-label names are routed to all local interfaces that have a DNS server
- configured, plus the globally configured DNS servers if there are any. Note that by default, lookups for
- domains with the .local suffix are not routed to DNS servers, unless the domain is
- specified explicitly as routing or search domain for the DNS server and interface. This means that on
- networks where the .local domain is defined in a site-specific DNS server, explicit
- search or routing domains need to be configured to make lookups within this DNS domain work. Note that
- these days, it's generally recommended to avoid defining .local in a DNS server, as
- RFC6762 reserves this domain for exclusive
+ Queries for multi-label names are routed via unicast DNS on local interfaces that have
+ a DNS server configured, plus the globally configured DNS servers if there are any. Which interfaces
+ are used is determined by the routing logic based on search and route-only domains, described below.
+ Note that by default, lookups for domains with the .local suffix are not routed to
+ DNS servers, unless the domain is specified explicitly as routing or search domain for the DNS server
+ and interface. This means that on networks where the .local domain is defined in a
+ site-specific DNS server, explicit search or routing domains need to be configured to make lookups work
+ within this DNS domain. Note that these days, it's generally recommended to avoid defining
+ .local in a DNS server, as RFC6762 reserves this domain for exclusive
MulticastDNS use.
- Address lookups are routed similarly to multi-label names, with the exception that
- addresses from the link-local address range are never routed to unicast DNS and are only resolved using
- LLMNR and MulticastDNS (when enabled).
+ Address lookups (reverse lookups) are routed similarly to multi-label names, with the
+ exception that addresses from the link-local address range are never routed to unicast DNS and are only
+ resolved using LLMNR and MulticastDNS (when enabled).If lookups are routed to multiple interfaces, the first successful response is returned (thus
effectively merging the lookup zones on all matching interfaces). If the lookup failed on all interfaces,
the last failing response is returned.
- Routing of lookups may be influenced by configuring per-interface domain names and other
- settings. See
+ Routing of lookups is determined by the per-interface routing domains (search and route-only) and
+ global search domains. See
systemd.network5 and
- resolvectl1 for
- details. The following query routing logic applies for unicast DNS traffic:
+ resolvectl1 for a
+ description how those settings are set dynamically and the discussion of Domains= in
+ resolved.conf5 for a
+ description of globally configured DNS settings.
+
+ The following query routing logic applies for unicast DNS traffic:If a name to look up matches (that is: is equal to or has as suffix) any of the
- configured search or route-only domains of any link (see
- systemd.network5),
- or the globally configured DNS settings (see the discussion of Domains= in
- resolved.conf5),
- "best matching" search/route-only domain is determined: the matching one with the most labels. The
- query is then sent to all DNS servers of any links or the globally configured DNS servers associated
- with this "best matching" search/route-only domain. (Note that more than one link might have this same
- "best matching" search/route-only domain configured, in which case the query is sent to all of them in
- parallel).
+ configured routing domains (search or route-only) of any link, or the globally configured DNS settings,
+ "best matching" routing domain is determined: the matching one with the most labels. The query is then
+ sent to all DNS servers of any links or the globally configured DNS servers associated with this "best
+ matching" routing domain. (Note that more than one link might have this same "best matching" routing
+ domain configured, in which case the query is sent to all of them in parallel).
In case of single-label names, when search domains are defined, the same logic applies, except
- that the name is first suffixed by the search domain.
+ that the name is first suffixed by each of the search domains in turn. Note that this search logic
+ doesn't apply to any names with at least one dot. Also see the discussion about compatiblity with
+ the traditional glibc resolver below.
- If a query does not match any configured search/route-only domain (neither per-link nor
- global), it is sent to all DNS servers that are configured on links with the "DNS default route" option
- set, as well as the globally configured DNS server.
+ If a query does not match any configured routing domain (either per-link or global), it
+ is sent to all DNS servers that are configured on links with the DefaultRoute=
+ option set, as well as the globally configured DNS server.
- If there is no link configured as "DNS default route" and no global DNS server
- configured, the compiled-in fallback DNS server is used.
+ If there is no link configured as DefaultRoute= and no global DNS
+ server configured, one of the compiled-in fallback DNS servers is used.
- Otherwise the query is failed as no suitable DNS servers could be determined.
+ Otherwise the unicast DNS query fails, as no suitable DNS servers can be determined.
- The "DNS default route" option is a boolean setting configurable with resolvectl
- or in .network files. If not set, it is implicitly determined based on the
- configured DNS domains for a link: if there's any route-only domain (not matching ~.)
- it defaults to false, otherwise to true.
+ The DefaultRoute= option is a boolean setting configurable with
+ resolvectl or in .network files. If not set, it is implicitly
+ determined based on the configured DNS domains for a link: if there's a route-only domain other than
+ ~., it defaults to false, otherwise to true.Effectively this means: in order to support single-label non-synthetized names, define appropriate
- search domains. In order to preferably route all DNS queries not explicitly matched by search/route-only
- domain configuration to a specific link, configure a ~. route-only domain on it. This
- will ensure that other links will not be considered for these queries (unless they too carry such a
- route-only domain). In order to route all such DNS queries to a specific link only if no other link
- is preferable, set the "DNS default route" option for the link to true and do not configure a
+ search domains. In order to preferably route all DNS queries not explicitly matched by routing domain
+ configuration to a specific link, configure a ~. route-only domain on it. This will
+ ensure that other links will not be considered for these queries (unless they too carry such a routing
+ domain). In order to route all such DNS queries to a specific link only if no other link is preferred,
+ set the DefaultRoute= option for the link to true and do not configure a
~. route-only domain on it. Finally, in order to ensure that a specific link never
- receives any DNS traffic not matching any of its configured search/route-only domains, set the "DNS
- default route" option for it to false.
+ receives any DNS traffic not matching any of its configured routing domains, set the
+ DefaultRoute= option for it to false.See
org.freedesktop.resolve15
for information about the D-Bus APIs systemd-resolved provides.
+
+ Compatibility with the traditional glibc stub resolver
+
+ This section provides a short summary of differences in the stub resolver implemented by
+ nss-resolve8 together
+ with systemd-resolved and the tranditional stub resolver implemented in
+ nss-dns8.
+
+
+ Some names are always resolved internally (see Synthetic Records above). Traditionally
+ they would be resolved by nss-files, and only if provided in
+ /etc/hosts.
+
+ Single-label names are not resolved for A and AAAA records using unicast DNS (unless
+ overriden with ResolveUnicastSingleLabel=, see
+ resolved.conf5).
+ This is similar to the option being set in
+ resolv.conf5.
+
+
+ Search domains are not used for suffixing of multi-label names.
+ (Search domains are nevertheless used for lookup routing, for names that were
+ originally specified as single-label or multi-label.) Any name with at least one dot is always
+ interpreted as a FQDN. nss-dns would resolve names both as relative (using search
+ domains) and absolute FQDN names. Some names would be resolved as relative first, and after that query
+ has failed, as absolute, while other names would be resolved in opposite order. The
+ ndots option in /etc/resolv.conf was used to control how many
+ dots the name needs to have to be resolved as relative first. This stub resolver does not implement
+ this at all: multi-label names are only resolved as FQDNs. (There are currently more than 1500
+ top-level domain names defined, and new ones are added regularly, often using "attractive" names that
+ are also likely to be used locally. Not looking up multi-label names in this fashion avoids fragility
+ in both directions: a valid global name could be obscured by a local name, and resolution of a relative
+ local name could suddenly break when a new top-level domain is created, or when a new subdomain of a
+ top-level domain in registered. Resolving any given name as either relative or absolute avoids this
+ ambiguity.)
+
+ This resolver has a notion of the special .local domain used for
+ MulticastDNS, and will not route queries with that suffix to unicast DNS servers unless explicitly
+ configured, see above. Also, reverse lookups for link-local addresses are not sent to unicast DNS
+ servers.
+
+ This resolver reads and caches /etc/hosts internally. (In other
+ words, nss-resolve replaces nss-files in addition to
+ nss-dns). Entries in /etc/hosts have highest priority.
+
+
+ This resolver also implements LLMNR and MulticastDNS in addition to the classic unicast
+ DNS protocol, and will resolve single-label names using LLMNR (when enabled) and names ending in
+ .local using MulticastDNS (when enabled).
+
+ Environment variables $LOCALDOMAIN and
+ $RES_OPTIONS described in
+ resolv.conf5 are not
+ supported currently.
+
+
+
/etc/resolv.conf
@@ -303,7 +361,6 @@
synchronous way.
-
diff --git a/src/resolve/resolved-resolv-conf.c b/src/resolve/resolved-resolv-conf.c
index 40f1f32f0a..ba8f18f82d 100644
--- a/src/resolve/resolved-resolv-conf.c
+++ b/src/resolve/resolved-resolv-conf.c
@@ -273,8 +273,8 @@ static int write_uplink_resolv_conf_contents(FILE *f, OrderedSet *dns, OrderedSe
}
if (ordered_set_isempty(domains))
- fputs("search .", f); /* Make sure that if the local hostname is chosen as fqdn this does not
- * imply a search domain */
+ fputs("search .\n", f); /* Make sure that if the local hostname is chosen as fqdn this does not
+ * imply a search domain */
else
write_resolv_conf_search(domains, f);
@@ -302,8 +302,8 @@ static int write_stub_resolv_conf_contents(FILE *f, OrderedSet *dns, OrderedSet
"options edns0 trust-ad\n", f);
if (ordered_set_isempty(domains))
- fputs("search .", f); /* Make sure that if the local hostname is chosen as fqdn this does not
- * imply a search domain */
+ fputs("search .\n", f); /* Make sure that if the local hostname is chosen as fqdn this does not
+ * imply a search domain */
else
write_resolv_conf_search(domains, f);
diff --git a/src/resolve/resolved.conf.in b/src/resolve/resolved.conf.in
index 514021792f..93279b3dff 100644
--- a/src/resolve/resolved.conf.in
+++ b/src/resolve/resolved.conf.in
@@ -25,5 +25,6 @@
#LLMNR=@DEFAULT_LLMNR_MODE@
#Cache=yes
#DNSStubListener=yes
+#DNSStubListenerExtra=
#ReadEtcHosts=yes
#ResolveUnicastSingleLabel=no