resolved: correctly handle address families with /etc/hosts lookups
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd |
Fix Released
|
Unknown
|
|||
systemd (Ubuntu) |
Fix Released
|
Medium
|
Martin Pitt |
Bug Description
I have an ipv4 entry for a key host on my network listed in /etc/hosts, for network recovery purposes. This host also has ipv6 connectivity; the ipv6 address is resolvable via DNS, but I do not have it in /etc/hosts. Resolution of hostname should be independent for each address family.
Two days ago (I don't know what changed to trigger this), I stopped being able to resolve the ipv6 address for this host. I traced this down to systemd-resolved, returning a lookup failure for the nss request, because the ipv6 address is not listed in /etc/hosts.
Removing resolve from /etc/nsswitch.conf restores the correct behavior.
Removing the ipv4 entry for the host restores the correct behavior.
ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: systemd 231-9ubuntu1
ProcVersionSign
Uname: Linux 4.8.0-27-generic x86_64
ApportVersion: 2.20.3-0ubuntu8
Architecture: amd64
CurrentDesktop: Unity
Date: Wed Nov 23 08:13:33 2016
InstallationDate: Installed on 2010-09-24 (2252 days ago)
InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.1)
MachineType: LENOVO 2306CTO
ProcKernelCmdLine: BOOT_IMAGE=
SourcePackage: systemd
UpgradeStatus: Upgraded to yakkety on 2016-10-28 (25 days ago)
dmi.bios.date: 10/25/2013
dmi.bios.vendor: LENOVO
dmi.bios.version: G2ET97WW (2.57 )
dmi.board.
dmi.board.name: 2306CTO
dmi.board.vendor: LENOVO
dmi.board.version: Not Defined
dmi.chassis.
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.
dmi.modalias: dmi:bvnLENOVO:
dmi.product.name: 2306CTO
dmi.product.
dmi.sys.vendor: LENOVO
tags: | added: patch |
tags: | added: resolved |
Changed in systemd: | |
status: | Unknown → New |
Changed in systemd (Ubuntu): | |
milestone: | none → ubuntu-16.12 |
Changed in systemd: | |
status: | New → Fix Released |
Confirmed. I wrote a test case for test/networkd- test.py which reproduces this. This should be committed together with the fix.