[Dnsmasq-discuss] No caching unless recursion enabled?

Simon Kelley simon at thekelleys.org.uk
Wed Feb 3 20:09:06 GMT 2016


On 27/01/16 03:49, bob tatus wrote:
> Thanks for that, so essentially I need to download the source code,
> modify and recompile? There is no simple way for me to otherwise do
> this with my current installation, as that isn't really an option in
> this environment. A configuration option to enable this would be
> great, but understand that you don't want to add this.

I don't want to add it, and even if I did that wouldn't help you if you
need to use the existing installation.
> 
> In that case I may look at placing the top entries I need in
> /etc/hosts as it will cache these results and that will do what I
> need as a last resort.

Can't you arrange for your authoritative server to set the RA bit in its
answer?

Cheers,

Simon.



> 
> Thanks for the help.
> 
>> From: b-morgan at concentric.net To: simon at thekelleys.org.uk;
>> allcowsgomoo123 at hotmail.com; dnsmasq-discuss at thekelleys.org.uk 
>> Subject: RE: [Dnsmasq-discuss] No caching unless recursion
>> enabled? Date: Mon, 25 Jan 2016 16:01:54 -0700
>> 
>>> /* Don't put stuff from a truncated packet into the cache. 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. */ if (!(header->hb3 & HB3_TC) && 
>>> !(header->hb4 & HB4_CD) && (header->hb4 & HB4_RA) && 
>>> !no_cache_dnssec) cache_end_insert();
>> 
>>> Removing the (header->hb4 & HB4_RA) && line will provide the
>>> behaviour you're seeking. I don't propose to make
>> this change in the distributed dnsmasq code.
>> 
>> I'd suggest adding a comment to the end of that line that reminds
>> anyone what removing it does (and then not removing the line but
>> commenting it out).
>> 
>> Brad
>> 
> 
> 




More information about the Dnsmasq-discuss mailing list