Skip to content
  1. Aug 28, 2016
  2. Aug 21, 2016
  3. Jul 20, 2016
  4. Jun 22, 2016
  5. Jun 04, 2016
  6. May 08, 2016
    • Antonio Larrosa's avatar
      connect: fix invalid "Network is unreachable" errors · ae8f6620
      Antonio Larrosa authored
      Sometimes, in systems with both ipv4 and ipv6 addresses but where the
      network doesn't support ipv6, Curl_is_connected returns an error
      (intermittently) even if the ipv4 socket connects successfully.
      
      This happens because there's a for-loop that iterates on the sockets but
      the error variable is not resetted when the ipv4 is checked and is ok.
      
      This patch fixes this problem by setting error to 0 when checking the
      second socket and not having a result yet.
      
      Fixes #794
      ae8f6620
  7. Apr 29, 2016
    • Daniel Stenberg's avatar
      lib: include curl_printf.h as one of the last headers · 4f45240b
      Daniel Stenberg authored
      curl_printf.h defines printf to curl_mprintf, etc. This can cause
      problems with external headers which may use
      __attribute__((format(printf, ...))) markers etc.
      
      To avoid that they cause problems with system includes, we include
      curl_printf.h after any system headers. That makes the three last
      headers to always be, and we keep them in this order:
      
       curl_printf.h
       curl_memory.h
       memdebug.h
      
      None of them include system headers, they all do funny #defines.
      
      Reported-by: David Benjamin
      
      Fixes #743
      4f45240b
  8. Apr 19, 2016
  9. Apr 18, 2016
  10. Apr 17, 2016
  11. Mar 20, 2016
  12. Feb 04, 2016
  13. Feb 02, 2016
  14. Nov 16, 2015
  15. Sep 27, 2015
  16. Sep 26, 2015
  17. Aug 01, 2015
    • Steve Holme's avatar
      win32: Fix compilation warnings from commit 40c921f8 · 11ab3f89
      Steve Holme authored
      connect.c:953:5: warning: initializer element is not computable at load
                       time
      connect.c:953:5: warning: missing initializer for field 'dwMinorVersion'
                       of 'OSVERSIONINFOEX'
      curl_sspi.c:97:5: warning: initializer element is not computable at load
                        time
      curl_sspi.c:97:5: warning: missing initializer for field 'szCSDVersion'
                        of 'OSVERSIONINFOEX'
      11ab3f89
  18. Jul 22, 2015
  19. Jun 08, 2015
  20. May 12, 2015
  21. Mar 24, 2015
  22. Mar 23, 2015
  23. Mar 17, 2015
  24. Mar 16, 2015
    • Jay Satiro's avatar
      connect: Fix happy eyeballs logic for IPv4-only builds · 059b3a57
      Jay Satiro authored
      Bug: https://github.com/bagder/curl/pull/168
      
      (trynextip)
      - Don't try the "other" protocol family unless IPv6 is available. In an
      IPv4-only build the other family can only be IPv6 which is unavailable.
      
      This change essentially stops IPv4-only builds from attempting the
      "happy eyeballs" secondary parallel connection that is supposed to be
      used by the "other" address family.
      
      Prior to this change in IPv4-only builds that secondary parallel
      connection attempt could be erroneously used by the same family (IPv4)
      which caused a bug where every address after the first for a host could
      be tried twice, often in parallel. This change fixes that bug. An
      example of the bug is shown below.
      
      Assume MTEST resolves to 3 addresses 127.0.0.2, 127.0.0.3 and 127.0.0.4:
      
      * STATE: INIT => CONNECT handle 0x64f4b0; line 1046 (connection #-5000)
      * Rebuilt URL to: http://MTEST/
      * Added connection 0. The cache now contains 1 members
      * STATE: CONNECT => WAITRESOLVE handle 0x64f4b0; line 1083
      (connection #0)
      *   Trying 127.0.0.2...
      * STATE: WAITRESOLVE => WAITCONNECT handle 0x64f4b0; line 1163
      (connection #0)
      *   Trying 127.0.0.3...
      * connect to 127.0.0.2 port 80 failed: Connection refused
      *   Trying 127.0.0.3...
      * connect to 127.0.0.3 port 80 failed: Connection refused
      *   Trying 127.0.0.4...
      * connect to 127.0.0.3 port 80 failed: Connection refused
      *   Trying 127.0.0.4...
      * connect to 127.0.0.4 port 80 failed: Connection refused
      * connect to 127.0.0.4 port 80 failed: Connection refused
      * Failed to connect to MTEST port 80: Connection refused
      * Closing connection 0
      * The cache now contains 0 members
      * Expire cleared
      curl: (7) Failed to connect to MTEST port 80: Connection refused
      
      The bug was born in commit bagder/curl@2d435c7.
      059b3a57
  25. Mar 15, 2015
  26. Mar 07, 2015
  27. Mar 03, 2015
  28. Feb 23, 2015
  29. Jan 20, 2015
  30. Dec 27, 2014
  31. Dec 16, 2014
    • Patrick Monnerat's avatar
      IPV6: address scope != scope id · 9081014c
      Patrick Monnerat authored
      There was a confusion between these: this commit tries to disambiguate them.
      - Scope can be computed from the address itself.
      - Scope id is scope dependent: it is currently defined as 1-based local
        interface index for link-local scoped addresses, and as a site index(?) for
        (obsolete) site-local addresses. Linux only supports it for link-local
        addresses.
      The URL parser properly parses a scope id as an interface index, but stores it
      in a field named "scope": confusion. The field has been renamed into "scope_id".
      Curl_if2ip() used the scope id as it was a scope. This caused failures
      to bind to an interface.
      Scope is now computed from the addresses and Curl_if2ip() matches them.
      If redundantly specified in the URL, scope id is check for mismatch with
      the interface index.
      
      This commit should fix SF bug #1451.
      9081014c
    • Patrick Monnerat's avatar
  32. Dec 04, 2014
  33. Nov 30, 2014
  34. Nov 19, 2014
    • Jon Spencer's avatar
      multi: inform about closed sockets before they are closed · 29336986
      Jon Spencer authored
      When the connection code decides to close a socket it informs the multi
      system via the Curl_multi_closed function. The multi system may, in
      turn, invoke the CURLMOPT_SOCKETFUNCTION function with
      CURL_POLL_REMOVE. This happens after the socket has already been
      closed. Reorder the code so that CURL_POLL_REMOVE is called before the
      socket is closed.
      29336986
  35. Nov 18, 2014
    • Carlo Wood's avatar
      debug: added new connection cache output, plus fixups · 013d5c18
      Carlo Wood authored
      Debug output 'typo' fix.
      
      Don't print an extra "0x" in
        * Pipe broke: handle 0x0x2546d88, url = /
      
      Add debug output.
      Print the number of connections in the connection cache when
        adding one, and not only when one is removed.
      
      Fix typos in comments.
      013d5c18
  36. Nov 16, 2014