cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: CURLOPT_LOCALPORT option broken ?!

From: Senthil Raja Velu <Senthil.Raja_at_ss8.com>
Date: Fri, 20 Feb 2009 17:10:08 -0800

Markus,
Nevertheless I tried the fix, but it did not work for me. Here are the
details;

My URL is set to: https://10.20.4.19/cgi-bin/TEST/TEST.py
    curl_easy_setopt(mp_curl, CURLOPT_LOCALPORTRANGE, 1L);
    curl_easy_setopt(mp_curl, CURLOPT_LOCALPORT,60027L);
    curl_easy_setopt(mp_curl, CURLOPT_INTERFACE, "10.0.110.131");

And CURL throws the following error using the trace callback;

CURL: About to connect() to 10.20.4.19 port 443 (#0)
CURL: Trying 10.20.4.19... CURL: Domain 10.0.110.131 is ip
CURL: Couldn't bind to ''
CURL: couldn't connect to host
CURL: Closing connection #0

Thanks,
Senthil.

-----Original Message-----
From: Senthil Raja Velu
Sent: Friday, February 20, 2009 11:39 AM
To: 'Daniel Stenberg'; libcurl development
Subject: RE: CURLOPT_LOCALPORT option broken ?!

Dan, Markus,
I am not clear about the patch
"curl_interface_and_port_patch_2nd_try.diff". Do I need to use both the
interface and port all the time and should not use any one of those
alone.
In that case, if at all I have to use only the port, could I set the
interface as "0.0.0.0" as a work-around for ADDR_ANY. Please clarify.

Thank you.
Senthil.

-----Original Message-----
From: Daniel Stenberg [mailto:daniel_at_haxx.se]
Sent: Friday, February 20, 2009 2:36 AM
To: libcurl development
Cc: Senthil Raja Velu
Subject: Re: CURLOPT_LOCALPORT option broken ?!

On Fri, 20 Feb 2009, koettermarkus_at_gmx.de wrote:

> applied a bad patch, binding a specific port without interface will
fail.

Ah nice. Looks fine to me. Thanks!

Senthil, can you confirm that this patch fixes your problem?

-- 
  / daniel.haxx.se
Received on 2009-02-21