cURL

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[curl:bugs] #1315 curl-7.34.0: hangs after hitting IPv6 address with no IPv6 available

From: Bjorn Stenberg <zagor_at_users.sf.net>
Date: Thu, 26 Dec 2013 22:41:25 +0000

I have a first shot at a patch now. I need to run more tests before submitting it, but would appreciate if you could try it out too.

~~~~
diff --git a/lib/connect.c b/lib/connect.c
index 4b6ee00..97a0655 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -1104,13 +1104,12 @@ CURLcode Curl_connecthost(struct connectdata *conn, /*
     conn->tempaddr[0]->ai_next == NULL ? timeout_ms : timeout_ms / 2;
 
   /* start connecting to first IP */
- res = singleipconnect(conn, conn->tempaddr[0], &(conn->tempsock[0]));
- while(res != CURLE_OK &&
- conn->tempaddr[0] &&
- conn->tempaddr[0]->ai_next &&
- conn->tempsock[0] == CURL_SOCKET_BAD)
- res = trynextip(conn, FIRSTSOCKET, 0);
-
+ while(conn->tempaddr[0]) {
+ res = singleipconnect(conn, conn->tempaddr[0], &(conn->tempsock[0]));
+ if(res == CURLE_OK)
+ break;
+ conn->tempaddr[0] = conn->tempaddr[0]->ai_next;
+ }
   if(conn->tempsock[0] == CURL_SOCKET_BAD)
     return res;
 
~~~~

---
** [bugs:#1315] curl-7.34.0: hangs after hitting IPv6 address with no IPv6 available**
**Status:** open
**Created:** Tue Dec 24, 2013 04:00 PM UTC by Anthony G. Basile
**Last Updated:** Thu Dec 26, 2013 07:27 PM UTC
**Owner:** Bjorn Stenberg
This was hit on a gentoo system and the downstream report can be seen at
   https://bugs.gentoo.org/show_bug.cgi?id=495170
In brief, if curl 7.34.0 tries an ipv6 address when one isn't available, it falls into a loop and eats 100% cpu.  This issue is not reproduceable on 7.33.0.
Here we used c-ares-1.9.1, libidn-1.28, openssl-1.0.1e and zlib-1.2.8.
---
Sent from sourceforge.net because curl-tracker@cool.haxx.se is subscribed to https://sourceforge.net/p/curl/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/curl/admin/bugs/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.
Received on 2013-12-26

These mail archives are generated by hypermail.

donate! Page updated December 19, 2013.
web site info

File upload with ASP.NET