curl-library
[PATCH] FTP EPSV handling on IPv6
Date: Wed, 07 Jan 2015 22:08:10 +0100
Hi,
I'm sending a patch that fixes this bug:
TL;DR: when an EPVS reply comes from an FTP server on a link-local IPv6
address, curl won't pass the scope ID necessary for a link-local IPv6
connection to the new connection info.
For more information see my bugreport: (Note that I initially
incorrectly blamed PASV handling, see later comment.)
https://sourceforge.net/p/curl/bugs/1468/
Someone also seems to have ran into the same problem a while back here:
http://curl.haxx.se/mail/archive-2012-01/0045.html
The attached patch fixes the problem in a very simple way: In EPSV
handling, the original hostname is simply copied and resolved again when
the data connection is being established. It is the same code as if
there was a proxy so I simply merged the two branches. I'm not sure it's
okay to have the hostname resolved again - let me know if not.
(Also, it might be a good idea not to fallback to PASV on IPv6 since
PASV is technically illegal on IPv6.)
Best Regards,
Vojtech Kral
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
- text/x-diff attachment: ftp-epsv.patch__size_1042