View Issue Details

IDProjectCategoryView StatusLast Update
0016317CentOS-7dnsmasqpublic2019-08-05 13:57
Reporteralexfv 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version7.5.1804 
Target VersionFixed in Version 
Summary0016317: Dnsmask replies "5: Refused" if host is in /etc/hosts and "0: No error" if the same host is in /etc/dnsmasq.d/* for AAAA records
DescriptionWhen I put a record into /etc/hosts file like

111.111.111.111 my.host.temp

Dnsmasq answers with code 5 "Refused" if I'm asking AAAA record.

But when I put this record in /etc/dnsmasq.d/my-host file like

address=/my.host.temp/111.111.111.111

Dnsmasq answers 0 "No error" while AAAA record querying.

It's not a big issue for common Linux resolver based on GLIBC, but for resolver in Alpine Linux (which is based on MUSL) it is, because MUSL resolver tries to resolve AAAA record first and considers "Refused" as an error code. After that answer MUSL resolver tries to re-ask DNS server after 2.5s timeout. That's why each DNS request from Alpine to Dnsmask takes about 5s in this case.

Steps To Reproduce1. Put record "111.111.111.111 my.host.temp" to /etc/hosts, then restart Dnsmasq
2. Run the DNS query from a host based on Alpine Linux and start traffic capture
3. See that the query is running for 5 sec. See "5: Refused" respond in the captured traffic
4. Remove record "111.111.111.111 my.host.temp" from /etc/hosts and put to /etc/dnsmasq.d/my-host then restart Dnsmasq
5. Run the DNS query from a host based on Alpine Linux and start traffic capture
6. See that the query returns immediately. See "0: No error" respond in the captured traffic
TagsNo tags attached.
abrt_hash
URL

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2019-08-05 13:57 alexfv New Issue