openwrt / odhcpd

This repository is a mirror of https://git.openwrt.org/?p=project/odhcpd.git. Pull requests will be accepted which will be merged in odhcpd.git
GNU General Public License v2.0
162 stars 98 forks source link

Link-local addresses for IPv6 DNS servers do not work for Linux systems #76

Closed mamarley closed 4 years ago

mamarley commented 8 years ago

The commit https://github.com/sbyx/odhcpd/commit/5b12eeba475a3301c362cf59f138ec7aa60d2dd9 breaks IPv6 DNS with Linux systems. If the system is configured to use IPv6 only, DNS lookups fail. For dig, the error is "connection timed out; no servers could be reached". I can reproduce this issue on Ubuntu 16.04 with NetworkManager.

toreanderson commented 8 years ago

Link-local DNS servers are perfectly valid, and has (in my experience) worked fine in NM since 2011. Assuming Ubuntu isn't shipping an ancient NM, the behaviour you're seeing must have some other reason. What's the contents of your /etc/resolv.conf file? What's the result of for NS in $(sed -n 's/^nameserver //p' /etc/resolv.conf); do dig @$NS . SOA; done?

mamarley commented 8 years ago

The only nameserver listed is 127.0.1.1, which is because Network Manager uses dnsmasq as a local DNS server. The output of the command is:

; <<>> DiG 9.10.3-P4-Ubuntu <<>> @127.0.1.1 . SOA ;; global options: +cmd ;; connection timed out; no servers could be reached

toreanderson commented 8 years ago

Ok, so this is a bug in dnsmasq and/or NetworkManager. The links will take you to the upstream bug reports I just filed.

For now you should be able to work around the issue by disabling dnsmasq (try sed -i /dns=dnsmasq/s/^/#/ /etc/NetworkManager/NetworkManager.conf).

toreanderson commented 8 years ago

Fixed in NetworkManager git master and nm-1.2 branches. I believe this odhcpd issue could be closed.