]> git.ipfire.org Git - thirdparty/systemd.git/commit
resolved: correctly handle non-address RR types with /etc/hosts lookups (#4808)
authorMartin Pitt <martin.pitt@ubuntu.com>
Thu, 22 Dec 2016 06:58:02 +0000 (07:58 +0100)
committerGitHub <noreply@github.com>
Thu, 22 Dec 2016 06:58:02 +0000 (07:58 +0100)
commit4050e04b2c3ff2a1ae458089735ff787fadb0038
treea5004b85e134ec9f13690c0b8fbdd10b14b0f385
parenteb64b435ebb2a7cb1274d5f8d8c323905caf29bc
resolved: correctly handle non-address RR types with /etc/hosts lookups (#4808)

Fix wrong condition test in manager_etc_hosts_lookup(), which caused it to
return an IPv4 answer when an IPv6 question was asked, and vice versa.
Also only return success if we actually found any A or AAAA record.

In systemd-resolved.service(8), point out that /etc/hosts mappings only
affect address-type lookups, not other types.

The test case currently disables DNSSEC in resolved, as there is a bug
where "-t MX" fails due to "DNSSEC validation failed" even after
"downgrading to non-DNSSEC mode". This should be dropped once that bug
gets fixed.

Fixes #4801
man/systemd-resolved.service.xml
src/resolve/resolved-etc-hosts.c
test/networkd-test.py