[FS#391] dnsmasq stops working properly if the fastest upstream DNS server returns a server failure

LEDE Bugs lede-bugs at lists.infradead.org
Mon Jan 16 09:29:02 PST 2017


The following task has a new comment added:

FS#391 - dnsmasq stops working properly if the fastest upstream DNS server returns a server failure
User who did this - IronicSven (IronicSven)

----------
Hi Stijn,

the problem still occurs with the allservers parameter.

My ISPs DNS servers are working fine right now but I created a Ubuntu VM in Virtualbox, installed a bind9 DNS server and assigned the manual IP address 192.168.3.2 without gateway address (which means it can't connect to the internet to resolve the request) to reproduce the DNS server failure.


sven at sven-VirtualBox:~$ nslookup facebook.com 192.168.3.2
Server:         192.168.3.2
Address:        192.168.3.2#53

** server can't find facebook.com: SERVFAIL


dnsmasq is now using the google public DNS servers and my faulty DNS server for the allservers parameter test.


root at FlensNet:~# uci set dhcp. at dnsmasq[0].allservers=1
root at FlensNet:~# uci commit dhcp
root at FlensNet:~# /etc/init.d/dnsmasq restart
root at FlensNet:~# nslookup facebook.com
nslookup: can't resolve '(null)': Name does not resolve

nslookup: can't resolve 'facebook.com': Try again
root at FlensNet:~# nslookup facebook.com
nslookup: can't resolve '(null)': Name does not resolve

nslookup: can't resolve 'facebook.com': Try again
root at FlensNet:~# nslookup facebook.com
nslookup: can't resolve '(null)': Name does not resolve

nslookup: can't resolve 'facebook.com': Try again


Syslog shows that the requests are forwarded to all DNS servers as expected but the reply messages are still missing:

Mon Jan 16 17:55:13 2017 daemon.info dnsmasq[1070]: exiting on receipt of SIGTERM
Mon Jan 16 17:55:17 2017 daemon.info dnsmasq[1933]: started, version 2.76 cachesize 500
Mon Jan 16 17:55:17 2017 daemon.info dnsmasq[1933]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-auth no-DNSSEC no-ID loop-detect inotify
Mon Jan 16 17:55:17 2017 daemon.info dnsmasq[1933]: DNS service limited to local subnets
Mon Jan 16 17:55:17 2017 daemon.info dnsmasq-dhcp[1933]: DHCP, IP range 192.168.3.100 -- 192.168.3.249, lease time 12h
Mon Jan 16 17:55:17 2017 daemon.info dnsmasq[1933]: using local addresses only for domain lan
Mon Jan 16 17:55:17 2017 daemon.info dnsmasq[1933]: reading /tmp/resolv.conf.auto
Mon Jan 16 17:55:17 2017 daemon.info dnsmasq[1933]: using local addresses only for domain lan
Mon Jan 16 17:55:17 2017 daemon.info dnsmasq[1933]: using nameserver 8.8.8.8#53
Mon Jan 16 17:55:17 2017 daemon.info dnsmasq[1933]: using nameserver 8.8.4.4#53
Mon Jan 16 17:55:17 2017 daemon.info dnsmasq[1933]: using nameserver 192.168.3.2#53
Mon Jan 16 17:55:17 2017 daemon.info dnsmasq[1933]: read /etc/hosts - 4 addresses
Mon Jan 16 17:55:17 2017 daemon.info dnsmasq[1933]: read /tmp/hosts/odhcpd - 0 addresses
Mon Jan 16 17:55:17 2017 daemon.info dnsmasq[1933]: read /tmp/hosts/dhcp.cfg02411c - 2 addresses
Mon Jan 16 17:55:17 2017 daemon.info dnsmasq-dhcp[1933]: read /etc/ethers - 0 addresses
Mon Jan 16 17:55:29 2017 daemon.info dnsmasq[1933]: 1 127.0.0.1/46400 query[A] facebook.com from 127.0.0.1
Mon Jan 16 17:55:29 2017 daemon.info dnsmasq[1933]: 1 127.0.0.1/46400 forwarded facebook.com to 8.8.8.8
Mon Jan 16 17:55:29 2017 daemon.info dnsmasq[1933]: 1 127.0.0.1/46400 forwarded facebook.com to 8.8.4.4
Mon Jan 16 17:55:29 2017 daemon.info dnsmasq[1933]: 1 127.0.0.1/46400 forwarded facebook.com to 192.168.3.2
Mon Jan 16 17:55:29 2017 daemon.info dnsmasq[1933]: 2 127.0.0.1/46400 query[AAAA] facebook.com from 127.0.0.1
Mon Jan 16 17:55:29 2017 daemon.info dnsmasq[1933]: 2 127.0.0.1/46400 forwarded facebook.com to 8.8.8.8
Mon Jan 16 17:55:29 2017 daemon.info dnsmasq[1933]: 2 127.0.0.1/46400 forwarded facebook.com to 8.8.4.4
Mon Jan 16 17:55:29 2017 daemon.info dnsmasq[1933]: 2 127.0.0.1/46400 forwarded facebook.com to 192.168.3.2
Mon Jan 16 17:55:29 2017 daemon.info dnsmasq[1933]: 3 127.0.0.1/46400 query[A] facebook.com from 127.0.0.1
Mon Jan 16 17:55:29 2017 daemon.info dnsmasq[1933]: 3 127.0.0.1/46400 forwarded facebook.com to 8.8.8.8
Mon Jan 16 17:55:29 2017 daemon.info dnsmasq[1933]: 3 127.0.0.1/46400 forwarded facebook.com to 8.8.4.4
Mon Jan 16 17:55:29 2017 daemon.info dnsmasq[1933]: 3 127.0.0.1/46400 forwarded facebook.com to 192.168.3.2
Mon Jan 16 17:55:29 2017 daemon.info dnsmasq[1933]: 4 127.0.0.1/46400 query[AAAA] facebook.com from 127.0.0.1
Mon Jan 16 17:55:29 2017 daemon.info dnsmasq[1933]: 4 127.0.0.1/46400 forwarded facebook.com to 8.8.8.8
Mon Jan 16 17:55:29 2017 daemon.info dnsmasq[1933]: 4 127.0.0.1/46400 forwarded facebook.com to 8.8.4.4
Mon Jan 16 17:55:29 2017 daemon.info dnsmasq[1933]: 4 127.0.0.1/46400 forwarded facebook.com to 192.168.3.2


DNS starts to work again after I remove 192.168.3.2 from the DNS servers list.
----------

More information can be found at the following URL:
https://bugs.lede-project.org/index.php?do=details&task_id=391#comment1274



More information about the lede-bugs mailing list