Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 11 Dec 2023 18:17:14 -0500
From: Rich Felker <>
To: Rafael Ávila de Espíndola <>
Subject: Re: MDNS using avahi2dns

On Mon, Dec 11, 2023 at 07:47:36PM -0100, Rafael Ávila de Espíndola wrote:
> Hi,
> I am trying to hack together
> The hard part is done by,
> which will use avahi to resolve .local domains. With it running,
> commands like
> $ dig @ printer0032DB24.local
> will work.
> In my laptop I was able to just have
> nameserver
> nameserver
> in /etc/resolv.conf, but I realize now that it worked only because wifi
> was relatively slow. On my desktop, using ethernet, the router answer
> sometimes comes first and name resolution fails.
> I will try setting up a local unbound next and configure it to forward
> to avahi2dns for .local and the DHCP provided server for everything
> else.
> I just wanted to check if musl doesn't have the support to selectively
> forward to different name servers.

Indeed, the officially supported way to do alternative name backends,
unioning of multiple name sources, etc. is pointing resolv.conf at a
program speaking DNS protocol and doing whatever logic you want.

Whenever resolv.conf has multiple nameservers listed, musl's resolver
expects them to be redundant sources for a common namespace. In theory
this *can* give you unioning if each one responds with ServFail
(inconclusive) or not at all for names outside of its jurisdiction,
but if one responds with NxDomain or NODATA, that will be conclusive
and preclude seeing a positive result from the other. The only
consistent way to avoid this would be waiting for responses from all
the nameservers to pick what to do, but that's generally very slow and
contrary to normal intent to use redundancy to get resilience against
outage of one or more nameservers.

If you put together a configuration for unioning .local from avahi and
want to share it here or on the wiki (or anywhere else), that might be
something other users would like and benefit from too.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.