[Dnsmasq-discuss] Local domains and local hosts

Simon Kelley simon at thekelleys.org.uk
Fri Sep 21 15:17:02 BST 2007

Jima wrote:
> On Fri, 21 Sep 2007, Simon Kelley wrote:
>> I've tried the above with dnsmasq 2.40, and it seems to work correctly
>> (no error). I don't recall specifically fixing this, but it might have
>> been fixed as a side-effect of other work. What version of dnsmasq are
>> you using?
>  First I tried this on one of my OpenWRT devices (since I knew I had an
> old version of dnsmasq on it).  Reproduced.  Then I tried it on my 2.40
> install...and reproduced it again.  Yeah, suffice it to say I was
> confused.  However, I did finally figure out what the problem was.
>  It's IPv6.  Evidently the address= line causes dnsmasq to respond
> NXDOMAIN to IPv6 queries for the hostname.  I added a second address=
> line pointing to an IPv6 address, and lo and behold, the `host` command
> returns successfully (and with both addresses).
>  I'm not sure what conditions are necessary to trigger this bug, whether
> it just requires IPv6 support to be loaded, or if you actually need a
> working IPv6 network (which I have).  But, I'm pretty sure that's the
> root of the problem.
>      Jima

That makes perfect sense; thanks Jima!

The problem is that "host" is doing both IPv4 and IPv6 queries. The Ipv6
one isn't finding data and would normally return "no-such-domain",
because of the local=/mysubdomain.mydomain.fi/ configuration and does so
in this case. That confuses the query code (if the domain doesn't exist,
there's no point repeating the query for IPv4). There is code to address
this, but it's broken in this case.


should fix things.



More information about the Dnsmasq-discuss mailing list