[Dnsmasq-discuss] Patch to cache SRV records - updated version (#3)

Simon Kelley simon at thekelleys.org.uk
Thu Dec 20 23:11:15 GMT 2018


This is worth having for the removal of the archaic 16-bit limit on the
flags field in a cache record alone. I've been meaning to tackle that
for some time.

This time of year either frees up lots of time for coding, or yields
none at all, and for me it's the later, but I will go through this and
merge it in the new year.


Cheers,

Simon.


On 20/12/2018 21:38, Jeremy Allison wrote:
> On 12/20/2018 12:20 PM, Jeremy Allison wrote:
>> On Thu, 20 Dec 2018 11:53:11 -0800
>>
>> Jeremy Allison <jra at google.com> wrote:
>>
>>> I know dnsmasq doesn't cache SRV records by design:
>>>
>>> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=579536;msg=9
>>>
>>> However, when used with Samba code (winbindd) and
>>> other Windows-integrating technology (MIT krb5)
>>> there are a lot of SRV record queries that make
>>> the whole integration stack slow if SRV records
>>> are not cached.
>>>
>>> With that in mind, here is a patch to cache
>>> SRV records positively and negatively inside
>>> dnsmasq.
>>>
>>> I'm sending here it so that people who might need
>>> this functionality have a central place to find
>>> it (it might end up being used in ChromeOS, depending
>>> on test results / review).
>>
>> Sigh. Found a bug when testing. free_mx_srv_record()
>> wasn't checking for NULL pointers on free(),
>> which can be the case for negative cache
>> records.
> 
> Third time is the charm :-). Remember to NULL
> out free'd and uninitialized pointers and
> structrures, and remove the F_SRV flag on deleting
> the cache entry.
> 
> Hopefully this is the last iteration of this.
> I can't see any more issues to address, but
> I'm still testing :-).
> 
> Jeremy.
> 
> 
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20181220/3e8db8fd/attachment.sig>


More information about the Dnsmasq-discuss mailing list