cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: ares and ipv6

From: Phil Blundell <pb_at_reciva.com>
Date: Mon, 17 Mar 2008 22:36:04 +0000

On Mon, 2008-03-17 at 12:44 +0100, Daniel Stenberg wrote:
> Some other concerns about the patch:
>
> o - Using getaddrinfo to check for and convert an IP6-only address to a struct
> addrinfo result. Is that really an effective way? We do have a inet_pton()
> function in use in the code already?
>
> o - I'm a bit concerned about the returning of the result directly from what
> getaddrinfo() returns as that requires a call to freeaddrinfo() while data
> that c-ares returns will not. I sense that there's either a memory leak or
> a memory mixup somewhere in there. Did you valgrind your tests?
>
> o - The uncondtional use of "struct sockaddr_in6" in the ip4-code will cause
> grief on systems that truly have no ipv6 support whatsoever. It needs some
> crafty #ifdefs or other magic to make it build on such systems as well.

Thanks for the feedback. Here's a new version of the patch. Let me
know if this is any better.

Thanks

Phil

Received on 2008-03-17