[avahi] Possible bug in CNAME resolution

Kyle Edwards kedwards at bullex.com
Wed Oct 14 06:07:13 PDT 2015


Trent,

Thanks for the reply.

>  - Can you send your avahi-daemon.conf (privately is fine if you prefer)

We are using the standard avahi-daemon.conf that ships with the
software. I've attached it.

>  - Can you confirm where the xxxx.net CNAME exists, is this in "normal" DNS?

No. It is in Avahi itself. We add the xxxx.net CNAME via
avahi_entry_group_add_record. Here is the C++ code in question:

// Add the CNAME record.
std::string net_hostname = hostname + ".net";
std::string local_hostname = hostname + ".local";
std::string rdata = *dns::name_string_to_binary(local_hostname);
if ((err = avahi_entry_group_add_record(avahi_entry_group_.get(),
					AVAHI_IF_UNSPEC,
					AVAHI_PROTO_UNSPEC,
					static_cast<AvahiPublishFlags>(0),
					net_hostname.c_str(),
					1, // INET
					5, // CNAME
					300,
					rdata.data(),
					rdata.length())) != AVAHI_OK) {
	throw std::system_error(err, bullex::network::avahi::avahi_category(),
"Unable to add CNAME record");
}

>  - Can you confirm your nsswitch.conf configuration for hosts, e.g.
>    # grep hosts /etc/nsswitch.conf

hosts:          files dns

Yes, I know that mDNS isn't in there. This isn't a problem because our
software itself has no reason to do DNS requests. Avahi is only
installed so that clients (iPads) can connect to our devices by hostname
rather than IP address.

Also, in case it helps, we are running our software on ARM (Raspberry
Pi) with Buildroot 2015.02. We are using Linux kernel version 3.19.1
with Raspberry Pi patches.

Kyle
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: avahi-daemon.conf
URL: <http://lists.freedesktop.org/archives/avahi/attachments/20151014/09be2b1c/attachment.ksh>


More information about the avahi mailing list