Bug 1565359

Summary: nss-mdns-0.14.1 fails to resolve hostnames
Product: [Fedora] Fedora Reporter: Jeff Bastian <jbastian>
Component: nss-mdnsAssignee: Adam Goode <adam>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: 27CC: adam, jbastian, lpoetter
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-09 23:53:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jeff Bastian 2018-04-09 22:02:44 UTC
Description of problem:
Hostnames in the .local domain fail to resolve after updating the nss-mdns package to 0.14.1.  It works fine with the older 0.10 package.

For example, I have a system named mantis on my home network with the address 192.168.2.2 and the older nss-mdns finds it:

[user@tarantula ~]$ rpm -q nss-mdns
nss-mdns-0.10-20.fc27.x86_64
[user@tarantula ~]$ getent hosts mantis.local
192.168.2.2     mantis.local


But after updating to the new package, it fails (and I get what appears to be a DNS-catch-all reply from my ISP):

[user@tarantula ~]$ sudo dnf -y update nss-mdns
...
[user@tarantula ~]$ rpm -q nss-mdns
nss-mdns-0.14.1-1.fc27.x86_64
[user@tarantula ~]$ getent hosts mantis.local
198.105.244.130 mantis.local.tarantula.localdomain
198.105.254.130 mantis.local.tarantula.localdomain


Downgrading nss-mdns fixes it again:

[user@tarantula ~]$ sudo dnf -y downgrade nss-mdns-0.10-20.fc27.x86_64
...
[user@tarantula ~]$ getent hosts mantis.local
192.168.2.2     mantis.local


Version-Release number of selected component (if applicable):
nss-mdns-0.14.1-1.fc27.x86_64

How reproducible:
always

Steps to Reproduce:
1. update to nss-mdns-0.14.1-1.fc27.x86_64
2. getent hosts foo.local

Actual results:
foo.local fails to resolve with nss-mdns

Expected results:
foo.local resolves

Additional info:

Comment 1 Adam Goode 2018-04-09 23:53:13 UTC
Sorry about that. I updated the documentation to make it clearer how to fix this problem:

https://github.com/lathiat/nss-mdns/blob/master/README.md#etcmdnsallow

Please file a bug on github if the documentation is still not clear.

Also, what is the output of your /etc/resolv.conf?

Comment 2 Jeff Bastian 2018-04-10 15:27:47 UTC
Ah-hah!  DNS SOA was the problem:

~]$ host -t SOA local
local.tarantula.localdomain has SOA record ns1-etm.att.net. nomail.etm.att.net. 1 604800 3600 2419200 900


I created /etc/mdns.allow and changed nsswitch.conf to use the non-minimal version and it's working again:

~]$ rpm -q nss-mdns
nss-mdns-0.14.1-1.fc27.x86_64

~]$ cat /etc/mdns.allow 
.local.
.local

~]$ grep ^hosts /etc/nsswitch.conf
hosts:     files mdns4 [NOTFOUND=return] dns myhostname

~]$ getent hosts mantis.local
192.168.2.2     mantis.local


I have NetworkManager configured to run dnsmasq as a name cache, so my resolv.conf is minimal:

~]$ cat /etc/NetworkManager/conf.d/dns.conf 
[main]
dns=dnsmasq

~]$ cat /etc/resolv.conf 
# Generated by NetworkManager
search tarantula.localdomain
nameserver 127.0.0.1


Thanks!