Bug 1565359 - nss-mdns-0.14.1 fails to resolve hostnames
Summary: nss-mdns-0.14.1 fails to resolve hostnames
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: nss-mdns
Version: 27
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Adam Goode
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-09 22:02 UTC by Jeff Bastian
Modified: 2018-04-10 15:27 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-09 23:53:34 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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!


Note You need to log in before you can comment on or make changes to this bug.