Bug 680996 - curl wrongly parses link-local IPv6 addresses used for proxy
Summary: curl wrongly parses link-local IPv6 addresses used for proxy
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: curl
Version: 19
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
Assignee: Kamil Dudka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-28 18:04 UTC by Till Maas
Modified: 2014-05-26 23:58 UTC (History)
3 users (show)

Fixed In Version: curl-7.29.0-19.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-05-16 10:08:36 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Till Maas 2011-02-28 18:04:26 UTC
Description of problem:
If I use a link-local IPv6 to define a proxy for curl to use, curl expects them in a wrong format as far as I can tell.

Version-Release number of selected component (if applicable):
curl-7.21.0-6.fc14

How reproducible:
always

Steps to Reproduce:
1. Get a link local IP address from your current interface:
declare address=$(LANG=C ifconfig eth1 | grep inet6 | cut -d: -f 2- | cut -d/  -f 1 | cut -d\  -f 2)
(echo $address looks like:
fe80::...:aabb
2. Use it as proxy:
LANG=C curl --proxy "http://[${address}%eth1]:1122" http://fedoraproject.org
curl: (5) Could not resolve proxy: fe80::...:aabb%eth1]; No such device
3. Use a bad syntax:
curl --proxy "http://[${address}%eth1:1122" http://fedoraproject.org
-> it works
curl --proxy "http://[${address}%eth1:1122]" http://fedoraproject.org
  
Actual results:
It works when the port is specified inside the square-brackets, but it does not work when the port is specified outside the square-brackets

Expected results:
The port should be recognized if it is specified after the brackets.

Additional info:
http://www.ietf.org/rfc/rfc2732.txt says that the IPv6-address is specified in brackets and the port follows. But I did not find special notes about link-local addresses that also contain a ethernet interface.

Comment 2 Till Maas 2011-02-28 20:11:53 UTC
Note to myself.
The function in lib/url.c that is probably resposible for the parsing has been changed in upstream since the version currently in Fedora. I need to recheck with versions in Rawhide or F15.

Comment 3 Kamil Dudka 2011-02-28 21:09:29 UTC
That file is being changed quite often -- currently 34 commits since 7.21.0, but nothing related IMHO:

$ git clone git:bagder/curl.git
$ cd curl
$ git log curl-7_21_0.. lib/url.c

Maybe faster to look for changes here:

$ git log curl-7_21_0.. -p docs/KNOWN_BUGS

Comment 4 Fedora End Of Life 2012-08-16 21:27:48 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 5 Till Maas 2014-03-15 18:29:55 UTC
still a bug in Fedora 19, but soon I will submit patches upstream.

Comment 6 Till Maas 2014-03-15 18:47:05 UTC
My Patches are here (I submitted them to the curl-library mailing list):
https://github.com/tyll/curl/tree/IPv6

Comment 7 Till Maas 2014-03-15 21:51:47 UTC
Upstream patches:
http://curl.haxx.se/mail/lib-2014-03/0090.html

Comment 8 Kamil Dudka 2014-03-15 22:49:17 UTC
Thank you for working on this!  I will keep watching the upstream submission...

Comment 10 Kamil Dudka 2014-04-02 13:29:46 UTC
fixed in curl-7.36.0-2.fc21

Comment 11 Fedora Update System 2014-05-10 18:13:26 UTC
curl-7.29.0-19.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/curl-7.29.0-19.fc19

Comment 12 Fedora Update System 2014-05-10 18:13:41 UTC
curl-7.32.0-10.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/curl-7.32.0-10.fc20

Comment 13 Fedora Update System 2014-05-12 05:22:40 UTC
Package curl-7.32.0-10.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing curl-7.32.0-10.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-6241/curl-7.32.0-10.fc20
then log in and leave karma (feedback).

Comment 14 Fedora Update System 2014-05-16 10:08:36 UTC
curl-7.32.0-10.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2014-05-26 23:58:22 UTC
curl-7.29.0-19.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.