Go to file
Kim Vandry 090b55c100 connect: treat an interface bindlocal() problem as a non-fatal error
I am using curl_easy_setopt(CURLOPT_INTERFACE, "if!something") to force
transfers to use a particular interface but the transfer fails with
CURLE_INTERFACE_FAILED, "Failed binding local connection end" if the
interface I specify has no IPv6 address. The cause is as follows:

The remote hostname resolves successfully and has an IPv6 address and an
IPv4 address.

cURL attempts to connect to the IPv6 address first.

bindlocal (in lib/connect.c) fails because Curl_if2ip cannot find an
IPv6 address on the interface.

This is a fatal error in singleipconnect()

This change will make cURL try the next IP address in the list.

Also included are two changes related to IPv6 address scope:

- Filter the choice of address in Curl_if2ip to only consider addresses
with the same scope ID as the connection address (mismatched scope for
local and remote address does not result in a working connection).

- bindlocal was ignoring the scope ID of addresses returned by
Curl_if2ip . Now it uses them.

Bug: http://curl.haxx.se/bug/view.cgi?id=1189
2013-04-06 16:51:58 +02:00
CMake cmake: use standard findxxx modules for cmake v2.8+ 2012-09-17 23:22:09 +02:00
docs curl_global_init.3: improve description of CURL_GLOBAL_ALL 2013-04-05 13:14:58 +02:00
include Multiple pipelines and limiting the number of connections. 2013-03-13 23:55:24 +01:00
lib connect: treat an interface bindlocal() problem as a non-fatal error 2013-04-06 16:51:58 +02:00
m4 configure: use XC_LIBTOOL for portability across libtool versions 2013-03-08 13:27:45 +01:00
packages build_vms.com: use existing curlbuild.h and parsing fix 2013-03-20 20:44:57 +01:00
perl removed trailing whitespace 2011-12-30 03:36:18 +01:00
src --engine: spellfix the help message 2013-04-04 16:25:10 +02:00
tests tftpd.c: Fixed sread timeout on Windows by setting it manually 2013-04-06 14:39:56 +02:00
vs move msvc IDE related files to 'vs' directory tree 2013-02-13 17:14:21 +01:00
winbuild msvc: move Makefile.msvc.names into winbuild/ 2013-02-06 23:14:11 +01:00
.gitattributes Tell git to not convert configure-related files. 2012-07-17 20:35:23 +02:00
.gitignore repository: ignore patch files generated by git 2013-02-22 23:22:22 +01:00
acinclude.m4 configure: fix cross pkg-config detection 2012-12-08 22:10:02 +01:00
buildconf Revert changes relative to lib/*.[ch] recent renaming 2013-01-06 18:20:27 +01:00
buildconf.bat curl tool: renaming hugehelp files to tool_hugehelp 2012-12-26 23:30:54 +01:00
CHANGES CHANGES: move all contents from CHANGES to CHANGES.0 2010-06-21 22:27:39 +02:00
CHANGES.0 removed trailing whitespace 2011-12-30 03:36:18 +01:00
CMakeLists.txt cmake: Fix mingw build 2013-02-04 22:35:09 +01:00
configure.ac curl.h: stricter CURL_EXTERN linkage decorations logic 2013-03-12 00:27:47 +01:00
COPYING COPYING: Updated copyright year to include 2013 2013-02-05 23:05:50 +00:00
CTestConfig.cmake ENH: move dashboard location 2009-07-15 19:40:46 +00:00
curl-config.in curl-config.in: do not randomly mix tabs and spaces 2013-02-06 15:04:57 +01:00
GIT-INFO curl tool: renaming hugehelp files to tool_hugehelp 2012-12-26 23:30:54 +01:00
install-sh install-sh: updated to support multiple source files as arguments 2013-02-13 15:47:54 +01:00
libcurl.pc.in build: prevent global LIBS from influencing src and lib build targets 2012-12-03 22:41:18 +01:00
log2changes.pl log2changes.pl: fix the Version output 2012-06-07 23:50:00 +02:00
MacOSX-Framework MacOSX-Framework: Make script work in Xcode 4.0 and later 2013-02-17 14:30:38 -07:00
Makefile.am move msvc IDE related files to 'vs' directory tree 2013-02-13 17:14:21 +01:00
Makefile.dist Changed some main makefile targets. 2011-09-25 17:43:50 +02:00
maketgz curl tool: use configuration files from lib directory 2012-04-06 23:37:05 +02:00
missing
mkinstalldirs install-sh: updated to support multiple source files as arguments 2013-02-13 15:47:54 +01:00
README various changes of CVS to git 2010-03-22 00:34:09 +01:00
RELEASE-NOTES RELEASE-NOTES: synced with 5e722b2d09 2013-04-05 23:31:00 +02:00
TODO-RELEASE TODO-RELEASE: cleanup for 7.28.0 2012-10-09 00:34:16 +02:00

                                  _   _ ____  _
                              ___| | | |  _ \| |
                             / __| | | | |_) | |
                            | (__| |_| |  _ <| |___
                             \___|\___/|_| \_\_____|

README

  Curl is a command line tool for transferring data specified with URL
  syntax. Find out how to use curl by reading the curl.1 man page or the
  MANUAL document. Find out how to install Curl by reading the INSTALL
  document.

  libcurl is the library curl is using to do its job. It is readily
  available to be used by your software. Read the libcurl.3 man page to
  learn how!

  You find answers to the most frequent questions we get in the FAQ document.

  Study the COPYING file for distribution terms and similar. If you distribute
  curl binaries or other binaries that involve libcurl, you might enjoy the
  LICENSE-MIXING document.

CONTACT

  If you have problems, questions, ideas or suggestions, please contact us
  by posting to a suitable mailing list. See http://curl.haxx.se/mail/

  All contributors to the project are listed in the THANKS document.

WEB SITE

  Visit the curl web site for the latest news and downloads:

        http://curl.haxx.se/

GIT

  To download the very latest source off the GIT server do this:

    git clone git://github.com/bagder/curl.git

  (you'll get a directory named curl created, filled with the source code)

NOTICE

  Curl contains pieces of source code that is Copyright (c) 1998, 1999
  Kungliga Tekniska Högskolan. This notice is included here to comply with the
  distribution terms.