cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLOPT_LOCALPORT option broken ?!

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 19 Feb 2009 09:54:10 +0100 (CET)

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