cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: CURLOPT_LOCALPORT option broken ?!

From: Senthil Raja Velu <Senthil.Raja_at_ss8.com>
Date: Thu, 19 Feb 2009 11:12:46 -0800

Dan,
Yes, I can look into it but only by next month if that's ok.

Thanks,
Senthil.

-----Original Message-----
From: curl-library-bounces_at_cool.haxx.se
[mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Daniel Stenberg
Sent: Thursday, February 19, 2009 12:54 AM
To: libcurl development
Subject: Re: CURLOPT_LOCALPORT option broken ?!

On Wed, 18 Feb 2009, Senthil Raja Velu wrote:

> I have installed the latest CURL (7.19.3) on Solaris 10 system. I
tried to
> use the connect only option to create a socket, but the local binding
fails
> if I use it along with the interface option as below;
>
> curl_easy_setopt(mp_curl, CURLOPT_LOCALPORT,
> mLocalAddress.sin_port);
> curl_easy_setopt(mp_curl, CURLOPT_LOCALPORTRANGE, 1L);
> curl_easy_setopt(mp_curl, CURLOPT_INTERFACE,
> inet_ntoa(mLocalAddress.sin_addr));
>
> curl_easy_setopt(mp_curl, CURLOPT_CONNECT_ONLY, 1L);

Ah, yes I can see how that quite possibly is not taken care of properly
since
it would then need to take both use the interface and the local port
into
account in a single bind() which I guess it doesn't do currently...

Any chance you can look into this issue?

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