[Dnsmasq-discuss] Local domains and local hosts

Simon Kelley simon at thekelleys.org.uk
Fri Sep 21 15:23:39 BST 2007


Lars Noodén wrote:
> Simon Kelley wrote:
>> Just to be clear, the problem is that
>>
>> local=/mysubdomain.mydomain.fi/
>> address=/apt-cacher.mysubdomain.mydomain.fi/192.168.123.45
>>
>> in /etc/dnsmasq.conf
>>
>> returns both the correct address and an error, for
>> apt-cacher.mysubdomain.mydomain.fi.
> 
> Yes.  It returns both the correct address, plus an error with host but
> not with dig.  I notice the error with whatever Ubuntu is using for
> installation (wget + maybe some other things)
> 
>> Please could you repeat the test, using "dig" instead of "host", dig
>> gives clearer information about exactly what is being returned.
> 
>  ; <<>> DiG 9.3.4 <<>> apt-cacher.mysubdomain.mydomain.fi
>  ;; global options:  printcmd
>  ;; Got answer:
>  ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62820
>  ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
> 
>  ;; QUESTION SECTION:
>  ;apt-cacher.mysubdomain.mydomain.fi.   IN      A
> 
>  ;; ANSWER SECTION:
>  apt-cacher.mysubdomain.mydomain.fi. 0  IN      A       192.168.123.45
> 
>  ;; Query time: 15 msec
>  ;; SERVER: 192.168.123.1#53(192.168.123.1)
>  ;; WHEN: Fri Sep 21 16:53:48 2007
>  ;; MSG SIZE  rcvd: 61
> 

As Jima spotted, the problem is that an IPv6 query for
apt-cacher.mysubdomain.mydomain.fi. is wrongly returning NXDOMAIN and
the resolver is deciding that since it's been told that the domain
doesn't exist, there's no need to try the query again for IPv4. The
correct behavior would be to return NODATA for the IPv6 query (ie, the
name is good, but it doesn't have an IPv6 address.)

I've put up

http://thekelleys.org.uk/dnsmasq/test-releases/dnsmasq-2.41test4.tar.gz

Which I believe fixes this. If you're not happy using test releases, a
simple workaround is to put the address of
apt-cacher.mysubdomain.mydomain.fi in /etc/hosts instead of
dnsmasq.conf. Names in /etc/hosts don't exhibit the bug.

Cheers,

Simon.




More information about the Dnsmasq-discuss mailing list