[Dnsmasq-discuss] Dnsmasq does not cache a authoritative response from upstream ?

Carlos Carvalho carlos at fisica.ufpr.br
Sat Oct 17 01:59:55 BST 2015


Simon Kelley (simon at thekelleys.org.uk) wrote on Fri, Oct 16, 2015 at 06:32:58PM BRT:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
> 
> Tracing this through the code, it turns out that what's inhibiting
> caching is not that the upstream server is authoritative. Rather, the
> problem is that it's NOT recursive.
> 
> There's even a relevant comment in the code that explains why.
> 
> /*
>  Don't cache replies from non-recursive nameservers, since we may get a
>  reply containing a CNAME but not its target, even though the target
>  does exist. */
> 
> 
> I guess that it would be possible to finnesse that to only inhibit
> caching when the answer does include a CNAME.

A non-recursive upstream is of little use. I suggest putting a warning in the
logs and leaving it as is.



More information about the Dnsmasq-discuss mailing list