cURL / Mailing Lists / curl-users / Single Mail

curl-users

is --interface or CURLOPT_INTERFACE bugged?

From: Bryan Schaefer <vega_12_at_yahoo.com>
Date: Sat, 26 Feb 2011 16:16:55 -0800 (PST)

Hello,

I have a multi-homed Fedora 14 box with the latest Curl release on it, and
WWW::Curl installed.

I am trying to use one of 3 outward facing interfaces to hit a website.

The following:

curl http://freedns.afraid.org

and

my $curl = WWW::Curl::Easy->new;
$curl->setopt(CURLOPT_URL, 'http://freedns.afraid.org');
$output = $curl->perform;
print $output;

both work fine.

However, when i try either of the following:

curl --interface eth0 http://freedns.afraid.org (or any interface, or an IP of
any interface)

or

my $curl = WWW::Curl::Easy->new;
$curl->setopt(CURLOPT_INTERFACE, 'eth0');
$curl->setopt(CURLOPT_URL, 'http://freedns.afraid.org');
$output = $curl->perform;
print $output;

it times out, returning code 7, could not connect to host.

Am I doing something wrong, or is the interface option wrong?

Thank you.

      

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-02-27