View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0016317||CentOS-7||dnsmasq||public||2019-08-05 13:57||2019-08-05 13:57|
|Target Version||Fixed in Version|
|Summary||0016317: 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|
|Description||When I put a record into /etc/hosts file like|
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
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 Reproduce||1. Put record "220.127.116.11 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 "18.104.22.168 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
|Tags||No tags attached.|