[Dnsmasq-discuss] How to get rid of AAAA forwards ?

Simon Kelley simon at thekelleys.org.uk
Sun Jun 1 20:12:33 UTC 2014


On 31/05/14 14:17, reiner otto wrote:
> I have dnsmasq installed on an embedded system, with a mobile internet connection. IPV6 is completely disabled in the kernel, for all interfaces.
> In the logs I still see a lot of messages like these ones:
> May 29 07:41:32 localhost dnsmasq[3604]: query[AAAA] edpn.ebay.com from 192.168.60.1
> May 29 07:41:32 localhost dnsmasq[3604]: cached edpn.ebay.com is <CNAME>
> May 29 07:41:32 localhost dnsmasq[3604]: forwarded edpn.ebay.com to 8.8.8.8
> May 29 07:41:32 localhost dnsmasq[3604]: reply edpn.g.ebay.com is NODATA-IPv6
> 
> So the request is forwarded, althogh the result is very predictadle, generating unnecessary traffic.
> 
> How to avoid these unnecessary forwards ?
> 
> (I would even apply a "dirty hack" to some src of dnsmasq, in case you can give me an initial hint.)
> 

There's no way to do that with the stock code. It comes under the
heading of "messing with the DNS" which tends not to work well. In this
case, consider what answer you should supply.

You could provide a NODATA repsonse to each AAAA query, but that is
telling the resolver that there _is_ data at a domain name of some type.
If the domain doesn't exist, that may come back and bite you.

On the other hand, you could provide a NXDOMAIN reply, but then the
resolver will not bother to do the A query, since you told it that the
domain doesn't exist.


There a whole load of IETF work, under the title of "happy eyeballs" on
how to get systems to work well when IPv4 and IPv6 may or may not both
exist. That's a good place to start researching this.



Cheers,


Simon.





More information about the Dnsmasq-discuss mailing list