Do not reorder nameserver addresses
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Netplan |
New
|
Undecided
|
Unassigned |
Bug Description
Nameserver addresses are reordered, because they are grouped by IP version and IPv4 entries are handled before any IPv6 entries. But the given order is crucial, the first one is the default nameserver and additional nameservers are usually just fallbacks.
[Example]
Given Netplan configuration:
network:
ethernets:
eth0:
addresses:
- 10.0.0.2/24
gateway4: 10.0.0.1
- ::1
- 8.8.8.8
- 8.8.4.4
renderer: networkd
version: 2
Results in this resolv.conf:
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver ::1
Expected resolv.conf:
nameserver ::1
nameserver 8.8.8.8
nameserver 8.8.4.4