cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-2990815 ] "interface" option does not work on an IPv6 VLAN

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Fri, 14 May 2010 20:15:13 +0000

Bugs item #2990815, was opened at 2010-04-22 13:04
Message generated for change (Comment added) made by bagder
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=2990815&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: libcurl
Group: wrong behaviour
>Status: Pending
>Resolution: Out of Date
Priority: 5
Private: No
Submitted By: Paul (codemonkey535)
Assigned to: Daniel Stenberg (bagder)
Summary: "interface" option does not work on an IPv6 VLAN

Initial Comment:
Attempting to bind a curl operation to take place using a VLAN interface specified by name does not work.

I am using libcurl 7.20.1 on a linux 2.6.31 kernel.

Do the following to create a VLAN:
vconfig add eth0 2
ifconfig eth0.2 up
ifconfig eth0.2 add fc00::2/64

Then assuming there is a web server at fc00::1 also on VLAN 2
> curl -g --interface eth0.2 http://[fc00::1]/index.html
should work but instead it reports
"cannot bind to eth0.2"

If instead I bind to the interface by using its IP address
> curl -g --interface fc00::2 http://[fc00::1]/index.html
then it seems to work.

And a third option which also works is to not specify the interface but to allow the routing table to determine which interface to use.
> curl -g http://[fc00::1]/index.html

However, neither of options 2 or 3 are good enough for my application since it is theoretically possible for the same local IP address to exist on different VLANs (which breaks option 2) or for the same remote IP address to be accessible via different VLANS (which breaks option 3)

If using an IPv4 address scheme it seems to work in both cases: interface IP or interface name.

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2010-05-14 22:15

Message:
Thanks for reporting this issue and helping us improve curl and libcurl.

We're awaiting feedback in this issue. Due to this, I have set the state
of this issue to pending and it will automatically get closed later on
unless we get further info.

Please consider answering the outstanding questions or providing the
missing info so that we can proceed to resolve this issue!

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2010-04-23 22:45

Message:
Paul, if2ip.c:Curl_if2ip() is the function used. On a modern Linux
HAVE_GETIFADDRS is defined. Can you figure out why/how the vlan interface
is not matched when the code loops over the existing interfaces?

----------------------------------------------------------------------

Comment By: Dan Fandrich (dfandrich)
Date: 2010-04-22 20:13

Message:
Have you tried specifying a scope identifier? Something like this: curl -g
'http://[fc00::1%254]/index.html' I don't think specifying --interface
works to specify the IPv6 scope. See curl --manual for more discussion on
scope identifiers.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=2990815&group_id=976
Received on 2010-05-14

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET