curl-library
Re: [PATCH] Add connection delay to Happy Eyeballs.
Date: Wed, 30 Oct 2013 21:41:30 -0700
On Wed, Oct 30, 2013 at 5:19 PM, Björn Stenberg <bjorn_at_haxx.se> wrote:
> Hi all.
>
> This patch brings the Happy Eyeball code closer in line with the RFC6555 by adding the requisite connection delay and address family preference.
>
> Please help me test it.
>
I tried the following cases, and they all look good except the second-to-last:
- Good connectivity:
+ Fetch ds.test-ipv6.com:
- Success, wireshark sees no IPv4 packets.
+ Fetch ipv6.test-ipv6.com:
- Success, wireshark sees no IPv4 packets.
+ Fetch ipv4.test-ipv6.com:
- Success, via IPv4.
- ip6tables -I FORWARD -o eth1 -d 2001:470:1:18::119 -j DROP
+ Fetch ds.test-ipv6.com:
- Success, after HEB fallback to IPv4.
+ Fetch ipv6.test-ipv6.com:
- Times out after 2 minutes. HEB does not interfere.
+ Fetch ipv4.test-ipv6.com:
- Success, via IPv4.
- Running on a network without IPv6:
+ Fetch ds.test-ipv6.com:
- Success, using IPv4.
+ Fetch ipv6.test-ipv6.com:
- Hangs for 5 minutes -- Regression!
+ Fetch ipv4.test-ipv6.com:
- Success, using IPv4.
For the one regression case, here's the old curl:
$ curl --version
curl 7.33.0 (x86_64-pc-linux-gnu) libcurl/7.33.0 OpenSSL/1.0.1e zlib/1.2.8
$ time curl -v http://ipv6.test-ipv6.com/ip/
* About to connect() to ipv6.test-ipv6.com port 80 (#0)
* Trying 2001:470:1:18::119...
* Failed to connect to 2001:470:1:18::119: Network is unreachable
* couldn't connect to host at ipv6.test-ipv6.com:80
* Closing connection 0
curl: (7) Failed to connect to 2001:470:1:18::119: Network is unreachable
real 0m0.011s
And here's git, plus your delay patch:
$ src/curl -v http://ipv6.test-ipv6.com/ip/
* Trying 2001:470:1:18::119...
* Failed to connect to : Network is unreachable
* Adding handle: conn: 0xe3b8e0
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0xe3b8e0) send_pipe: 1, recv_pipe: 0
// -- 5 minute hang --
* Connection timed out after 300853 milliseconds
* Closing connection 0
curl: (28) Failed to connect to : Network is unreachable
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-10-31