[Dnsmasq-discuss] non-recursive DNS ansewers patch
Nikolay P
nikolay.p at cos.flag.org
Sun Feb 15 18:33:02 GMT 2015
This question is for maintainers of Dnsmasq
I want to consult you if the attached patch is safe.
I am trying to develop a workaround for this:
/* 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. */
As currently implemented in src/rfc1035.c any answer from non-recursive DNS servers will not be cached.
if (!(header->hb3 & HB3_TC) &&
!(header->hb4 & HB4_CD) &&
(header->hb4 & HB4_RA) &&
!no_cache_dnssec)
cache_end_insert();
The attached patch enables caching of DNS answers from non-recursive servers IF the answer DOES NOT contain a CNAME record.
Could you check the patch and let me know if I got it right and it is safe to implement?
The patched code compiled successfully and worked OK so far.
Best, Nikolay
-------------- next part --------------
A non-text attachment was scrubbed...
Name: non_recursive_server.patch
Type: text/x-patch
Size: 450 bytes
Desc: not available
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20150215/90e84095/attachment.bin>
More information about the Dnsmasq-discuss
mailing list