cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Debugging test cases

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Mon, 29 Mar 2004 07:48:50 +0200 (CEST)

On Sun, 28 Mar 2004, Joe Halpin wrote:

> > It's supposed to return an address like "ffff::1:2%4" with 4
> > specifying the scope for the address. AFAIK the address is only
> > valid at the 4th interface; eth3 on Unix-like systems since scope
> > 0 (the default) indicates all possible interfaces.
> >
> > That's my recollection of it anyway. Long time since I've studied this.
>
> It doesn't look like curl uses this anywhere (anywhere I can find at least).

Uses what? The NIFLAGS or the NI_WITHSCOPEID? To be honest, I don't remember
why we added the use of NI_WITHSCOPEID but I figure I should do some research.

> After some more poking around I notice that the ftp test server only binds
> an IPv4 address. We may want to also test with an IPv6 binding as well.

I agree about that. Today we don't test anything ipv6, we only build with
ipv6-capable functionality and hope that ipv6 works.

The test suite has lots of "white areas" that it doesn't test anything in that
we could/should fix.

I believe only two test cases were written by someone else than me so it does
take a while to extend the set of tests. (I honestly don't believe that it is
THAT hard to write test cases.)

> As for the client, it seems to always come up with an IPv4 address, even if
> ENABLE_IPV6 is defined.

Have you really tried to use a ipv6-resolvable address (using AAAA DNS entries
or a ipv6-address in /etc/hosts)? AFAIK, I have got reports of successfull
usage on truly ipv6-conencted hosts. I seem to recall myself having verified
this as well.

> I've been trying to figure out why that is, but it's kind of a labyrinth in
> the connect stuff and I'm getting dizzy.

Yes, I feel a bit bad about the state of the functions in lib/connect.c and I
hope to be able to add a good chunk of comments in there soon to better
explain the reason and usage of each function. The main reason for the
complexity is the multi interface support (and thus the need for non-blocking
functions).

> Anyone know where IPV6 is forced (or is it)?

IPv6 is not "forced" unless you set CURLOPT_IPRESOLVE to CURL_IPRESOLVE_V6,
which then should make the resolve function only get ipv6 address(es).

-- 
     Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
      Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-03-29