1 |
blueness 13/12/27 16:49:47 |
2 |
|
3 |
Added: curl-7.34.0-fix-ipv6-failover.patch |
4 |
Log: |
5 |
Add patch for bug #495170 |
6 |
|
7 |
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 net-misc/curl/files/curl-7.34.0-fix-ipv6-failover.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/curl/files/curl-7.34.0-fix-ipv6-failover.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/curl/files/curl-7.34.0-fix-ipv6-failover.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: curl-7.34.0-fix-ipv6-failover.patch |
16 |
=================================================================== |
17 |
This fixes bug #495170: hangs after hitting IPv6 address with no IPv6 |
18 |
|
19 |
See upstream: https://sourceforge.net/p/curl/bugs/1315/ |
20 |
|
21 |
diff --git a/lib/connect.c b/lib/connect.c |
22 |
index 4b6ee00..97a0655 100644 |
23 |
--- a/lib/connect.c |
24 |
+++ b/lib/connect.c |
25 |
@@ -1104,13 +1104,12 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* |
26 |
conn->tempaddr[0]->ai_next == NULL ? timeout_ms : timeout_ms / 2; |
27 |
|
28 |
/* start connecting to first IP */ |
29 |
- res = singleipconnect(conn, conn->tempaddr[0], &(conn->tempsock[0])); |
30 |
- while(res != CURLE_OK && |
31 |
- conn->tempaddr[0] && |
32 |
- conn->tempaddr[0]->ai_next && |
33 |
- conn->tempsock[0] == CURL_SOCKET_BAD) |
34 |
- res = trynextip(conn, FIRSTSOCKET, 0); |
35 |
- |
36 |
+ while(conn->tempaddr[0]) { |
37 |
+ res = singleipconnect(conn, conn->tempaddr[0], &(conn->tempsock[0])); |
38 |
+ if(res == CURLE_OK) |
39 |
+ break; |
40 |
+ conn->tempaddr[0] = conn->tempaddr[0]->ai_next; |
41 |
+ } |
42 |
if(conn->tempsock[0] == CURL_SOCKET_BAD) |
43 |
return res; |