Request for comment for async resolution of DNS names

Stefan Metzmacher metze at samba.org
Fri Feb 10 10:30:10 UTC 2017


Hi Matthieu,

> On 02/09/2017 12:33 AM, Volker Lendecke wrote:
>> On Wed, Feb 08, 2017 at 11:10:11AM -0800, Matthieu Patou wrote:
>> <snip>
>> Can you restructure the code to only call getaddrinfo and nothing else
>> in the threaded job.
> Please find attached an updated version of the patch, it should do very
> minimal things in the thread function.
> It seems to work for me both when I have additional records in the SRV
> response and when I haven't, valgrind didn't seems to complain and net
> joins seems to work.
> I need more tests but so
> 
> There was an alternative solution (that I have saved somewhere) where I
> cheat with the struct dns_rr_srv structure to pass the struct addrinfo
> back to the main thread by using the pointer to struct sockaddr_storage
> to store the point to struct addrinfo.
> But Jeremy was not very keen on it, so instead here is the variant where
> there is a separate state structure for the resolve_one_name function.

It seems we already have getaddrinfo_send/recv can't we just use them?
There're currently based on fncall_send/recv and are also available
in older releases.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170210/3977bbf5/signature.sig>


More information about the samba-technical mailing list