Original description:
Regardless of ndots option in /etc/resolv.conf, when NXDOMAIN is returned from the DNS server then resolver always try another attempt with the original name extended by what is in search option.
For example, if you're looking for very.long.url.nowhere and there is a line "search ubuntu.com" in resolv.conf you will get addres of server very.long.url.nowhere.ubuntu.com if such exists. It is incorrect, it should occurs only for urls having less that ndots option dots in its name.
My system is a standard Ubuntu Xenial desktop amd64 using network manager and the default configured Wired Connection 1 (i.e. DHCP).
In my case:
Mar 20 23:19:22 eragon dnsmasq[27367]: 46 127.0.0.1/40646 query[A] some.long.non-existent.name from 127.0.0.1
Mar 20 23:19:22 eragon dnsmasq[27367]: 46 127.0.0.1/40646 forwarded some.long.non-existent.name to 192.168.5.1
Mar 20 23:19:22 eragon dnsmasq[27367]: 46 127.0.0.1/40646 reply some.long.non-existent.name is NXDOMAIN
Mar 20 23:19:22 eragon dnsmasq[27367]: 47 127.0.0.1/52417 query[A] some.long.non-existent.name.sebunger.dnsalias.org from 127.0.0.1
Mar 20 23:19:22 eragon dnsmasq[27367]: 47 127.0.0.1/52417 forwarded some.long.non-existent.name.sebunger.dnsalias.org to 192.168.5.1
Mar 20 23:19:23 eragon dnsmasq[27367]: 47 127.0.0.1/52417 reply some.long.non-existent.name.sebunger.dnsalias.org is <CNAME>
Mar 20 23:19:23 eragon dnsmasq[27367]: 47 127.0.0.1/52417 reply sebunger.dnsalias.org is 203.173.156.30
My /etc/resolv.conf (which is a sym-link to ../run/resolvconf/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
search sebunger.dnsalias.org
options ndots:1
This is a re-report of https:/ /bugs.launchpad .net/ubuntu/ +source/ linux/+ bug/401202 since that one was apparently closed as no-fix simply because it was too old.
This still occurs in xenial.
Original description: url.nowhere and there is a line "search ubuntu.com" in resolv.conf you will get addres of server very.long. url.nowhere. ubuntu. com if such exists. It is incorrect, it should occurs only for urls having less that ndots option dots in its name.
Regardless of ndots option in /etc/resolv.conf, when NXDOMAIN is returned from the DNS server then resolver always try another attempt with the original name extended by what is in search option.
For example, if you're looking for very.long.
My system is a standard Ubuntu Xenial desktop amd64 using network manager and the default configured Wired Connection 1 (i.e. DHCP).
To reproduce: ager/dnsmasq. d/domain <<<'log- queries= extra' non-existent. name
- sudo install /dev/fd/0 /etc/NetworkMan
- sudo killall dnsmasq
- ping some.long.
- Watch /var/log/syslog
In my case: non-existent. name from 127.0.0.1 non-existent. name to 192.168.5.1 non-existent. name is NXDOMAIN non-existent. name.sebunger. dnsalias. org from 127.0.0.1 non-existent. name.sebunger. dnsalias. org to 192.168.5.1 non-existent. name.sebunger. dnsalias. org is <CNAME> dnsalias. org is 203.173.156.30
Mar 20 23:19:22 eragon dnsmasq[27367]: 46 127.0.0.1/40646 query[A] some.long.
Mar 20 23:19:22 eragon dnsmasq[27367]: 46 127.0.0.1/40646 forwarded some.long.
Mar 20 23:19:22 eragon dnsmasq[27367]: 46 127.0.0.1/40646 reply some.long.
Mar 20 23:19:22 eragon dnsmasq[27367]: 47 127.0.0.1/52417 query[A] some.long.
Mar 20 23:19:22 eragon dnsmasq[27367]: 47 127.0.0.1/52417 forwarded some.long.
Mar 20 23:19:23 eragon dnsmasq[27367]: 47 127.0.0.1/52417 reply some.long.
Mar 20 23:19:23 eragon dnsmasq[27367]: 47 127.0.0.1/52417 reply sebunger.
My /etc/resolv.conf (which is a sym-link to ../run/ resolvconf/ resolv. conf dnsalias. org
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
search sebunger.
options ndots:1
(I added the options ndots with no effect)