Bug 1929212 - systemd-resolved can not parse two addresses in /etc/systemd/resolved.conf
Summary: systemd-resolved can not parse two addresses in /etc/systemd/resolved.conf
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 33
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-16 13:34 UTC by Steve Dickson
Modified: 2021-02-16 14:01 UTC (History)
13 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-02-16 14:01:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Steve Dickson 2021-02-16 13:34:54 UTC
Description of problem:
When the system comes up and DNS (in /etc/systemd/resolved.conf) is
set to two comma separated addresses 
   DNS=<address1>,<address2>

Fails with 
Failed to add DNS server address '<address1>,<address2>, ignoring: Invalid argument

which results in no DNS. 

Version-Release number of selected component (if applicable):
systemd-246.10-1.fc33

How reproducible:
100%

Comment 1 Michael Catanzaro 2021-02-16 14:01:34 UTC
I know this used to work, but *that* was the bug. The addresses must be space-separated:

       DNS=
           A space-separated list of IPv4 and IPv6 addresses to use as system
           DNS servers. Each address can optionally take a port number
           separated with ":", a network interface name or index separated
           with "%", and a Server Name Indication (SNI) separated with "#".
           When IPv6 address is specified with a port number, then the address
           must be in the square brackets. That is, the acceptable full
           formats are "111.222.333.444:9953%ifname#example.com" for IPv4 and
           "[1111:2222::3333]:9953%ifname#example.com" for IPv6. DNS requests
           are sent to one of the listed DNS servers in parallel to suitable
           per-link DNS servers acquired from systemd-networkd.service(8) or
           set at runtime by external applications. For compatibility reasons,
           if this setting is not specified, the DNS servers listed in
           /etc/resolv.conf are used instead, if that file exists and any
           servers are configured in it. This setting defaults to the empty
           list.


Note You need to log in before you can comment on or make changes to this bug.