Request for comment for async resolution of DNS names

Stefan Metzmacher metze at
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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the samba-technical mailing list