[Pkg-utopia-maintainers] Bug#728234: avahi-daemon-check-dns.sh fails when the 'local' zone lacks a SOA RR

Sam Morris sam at robots.org.uk
Tue Oct 29 19:57:26 UTC 2013


Package: avahi-daemon
Version: 0.6.31-2
Severity: important

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

libnss-mdns breaks DNS lookups on networks that use a subdomain of
the 'local' zone.

After removing libnss-mdns:

	$ dig +short jenkins.myorg.local
	realserver.myorg.local
	192.168.0.1

myorg.local has a SOA record, as expected:

	$ dig +short -t soa myorg.local
	ns0.myorg.local. foo.myorg.com. 3000120542 60 15 3628800 60

But avahi-check-dns.sh fails to detect that this domain is in use:

	$ sh -x /usr/lib/avahi/avahi-daemon-check-dns.sh
	+ PATH=/bin:/usr/bin:/sbin:/usr/sbin
	+ RUNDIR=/var/run/avahi-daemon/
	+ DISABLE_TAG=/var/run/avahi-daemon//disabled-for-unicast-local
	+ NS_CACHE=/var/run/avahi-daemon//checked_nameservers
	+ AVAHI_DAEMON_DETECT_LOCAL=1
	+ test -f /etc/default/avahi-daemon
	+ . /etc/default/avahi-daemon
	+ AVAHI_DAEMON_DETECT_LOCAL=1
	+ [ 1 != 1 ]
	+ dns_reachable
	+ grep -q nameserver /etc/resolv.conf
	+ 
	+ egrep -q nameserver 127.0.0.1|::1 /etc/resolv.conf
	+ 
	+ grep  addr:
	+ LC_ALL=C ifconfig
	+ ADDRS=          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
		  inet6 addr: fe80::a00:27ff:fe63:5ef5/64 Scope:Link
		  inet addr:127.0.0.1  Mask:255.0.0.0
		  inet6 addr: ::1/128 Scope:Host
	+ egrep -v :127|Scope:Host|Scope:Link
	+ echo           inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
		  inet6 addr: fe80::a00:27ff:fe63:5ef5/64 Scope:Link
		  inet addr:127.0.0.1  Mask:255.0.0.0
		  inet6 addr: ::1/128 Scope:Host
	+ ADDRS=          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
	+ grep ^0.0.0.0 
	+ route -n
	+ ROUTES=0.0.0.0         10.0.2.2        0.0.0.0         UG    0      0        0 eth0
	+ [ -z           inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0 -o -z 0.0.0.0         10.0.2.2        0.0.0.0         UG    0      0        0 eth0 ]
	+ return 0
	+ dns_needs_check
	+ TMP_CACHE=/var/run/avahi-daemon//checked_nameservers.5710
	+ RET=0
	+ ensure_rundir
	+ [ ! -d /var/run/avahi-daemon/ ]
	+ sort
	+ grep nameserver
	+ cat /etc/resolv.conf
	+ [ -e /var/run/avahi-daemon//checked_nameservers ]
	+ mv /var/run/avahi-daemon//checked_nameservers.5710 /var/run/avahi-daemon//checked_nameservers
	+ return 0
	+ dns_has_local
	+ [ -n  ]
	+ LC_ALL=C host -t soa local.
	+ OUT=Host local. not found: 3(NXDOMAIN)
	+ [ 1 -eq 0 ]
	+ rm -f /var/run/avahi-daemon//checked_nameservers
	+ return 1
	+ enable_avahi
	+ [ -e /var/run/avahi-daemon//disabled-for-unicast-local ]
	+ exit 0

I guess because there is no SOA RR for 'local':

	$ host -t soa local
	Host local not found: 3(NXDOMAIN)

Now, on some systems of this network it seems possible to detect that
.local is in use:

	$ hostname -f
	host1.myorg.local

But others are configured differently:

	$ hostname -f
	host2

This seems to be caused by host2 not having an alias for
'host2.myorg.local' in /etc/hosts.

host(1) can be used on both systems to discover that .local is being
used, however:

	$ host host2
	host2.myorg.local has address 10.0.0.213

In addition, both systems have 'search myorg.local' in /etc/resolv.conf, so
looking for 'domain' or 'search' entries in that file may be another way
to detect that avahi should disable itself.

- -- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (540, 'testing'), (530, 'unstable'), (520, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.10-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages avahi-daemon depends on:
ii  adduser            3.113+nmu3
ii  bind9-host [host]  1:9.8.4.dfsg.P1-6+nmu3
ii  dbus               1.6.16-1
ii  libavahi-common3   0.6.31-2
ii  libavahi-core7     0.6.31-2
ii  libc6              2.17-93
ii  libcap2            1:2.22-1.2
ii  libdaemon0         0.14-2
ii  libdbus-1-3        1.6.16-1
ii  libexpat1          2.1.0-4
ii  lsb-base           4.1+Debian12

Versions of packages avahi-daemon recommends:
ii  libnss-mdns  0.10-4

Versions of packages avahi-daemon suggests:
pn  avahi-autoipd  <none>

- -- no debconf information

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)

iEYEARECAAYFAlJwEyAACgkQshl/216gEHjgwwCdELKmcNzM7Pdw3/wGpkXxnszX
r7cAoLXEskvaBU6OuMjU8istBmNM/th/
=mXeC
-----END PGP SIGNATURE-----



More information about the Pkg-utopia-maintainers mailing list