Request for comment for async resolution of DNS names

Matthieu Patou mat at samba.org
Fri Feb 10 08:00:47 UTC 2017


Hello,
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.

Matthieu

-- 
Matthieu Patou
Samba Team
http://samba.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Move-to-async-name-resolution-for-names-returned-by-.patch
Type: text/x-diff
Size: 13231 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170210/00675630/0001-Move-to-async-name-resolution-for-names-returned-by-.diff>


More information about the samba-technical mailing list