cURL / Mailing Lists / curl-library / Single Mail


Re: CURLOPT_LOCALPORT option broken ?!

From: <>
Date: Sat, 21 Feb 2009 02:35:12 +0100


I hope you took the second patch.
I tested this using the curl cli, and would be glad if you could too.

curl --interface --local-port 60027-60028

Would match your query.

As I do not have here, here is a slightly different output
when asking for

/opt/curl/bin/curl --verbose --interface --local-port
41022-41023 > /dev/null
* About to connect() to port 80 (#0)
* Trying Domain is ip
* Local port: 41022
* connected
* Connected to ( port 80 (#0)

If I take your output correct, "" was not 'resolved' to an
ip address correctly.

> CURL: Trying CURL: Domain is ip

that line should look like:

"CURL: Trying CURL: Domain is ip"

Maybe Daniel can tell help me out on Curl_resolv and Curl_resolv_unlock?
Curl_resolv returns, h is not NULL, but the result is empty string?
Which resolver do you use?

Additionally, please try

curl --interface eth0 --local-port 60027-60028

and replace eth0 by your interface

as well as

curl --interface myhostname --local-port 60027-60028

and replace the hostname with your hostname.

and include the output with your mail.

Received on 2009-02-21