resolv: Do not send queries for non-host-names in nss_dns [BZ #24112]
commit6ca53a2453598804a2559a548a08424fca96434a
authorFlorian Weimer <fweimer@redhat.com>
Mon, 21 Jan 2019 08:26:41 +0000 (21 09:26 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Mon, 21 Jan 2019 08:26:41 +0000 (21 09:26 +0100)
treeaba412e2b8e57adede251922d098e7f62f388fdb
parent5e30b8ef0758763effa115634e0ed7d8938e4bc0
resolv: Do not send queries for non-host-names in nss_dns [BZ #24112]

Before this commit, nss_dns would send a query which did not contain a
host name as the query name (such as invalid\032name.example.com) and
then reject the answer in getanswer_r and gaih_getanswer_slice, using
a check based on res_hnok.  With this commit, no query is sent, and a
host-not-found error is returned to NSS without network interaction.
ChangeLog
resolv/nss_dns/dns-host.c