[PATCH] Active Mode FTPS Data Port Range
Date: Sat, 25 Apr 2009 05:19:51 +0200
Daniel Stenberg wrote:
> The TODO mention: http://curl.haxx.se/docs/todo.html#PORT_port_range
> The source code: lib/ftp.c:ftp_state_use_port() would be a starting
> point I guess.
I had a look, first idea was 'not possible' due to ipv6.
Then I decided you have to enter ipv6 addresses as [ipv6] if you want to
specify a port(range), and curl has to keep compatibility with current
Accepted format for FTPPORT is
ipv6:port(-range) as we never how to interpret it, you have to use
for this case
[ipv6] is accepted too.
are corrected ( 0 is choosen )
Patch is attached, tested with ipv4/6 for domains, addresses, interfaces.
As I did not get the idea of maintaining seperate dualstack and ipv4
code for it, I removed the ipv4 only code, and ifdef'd the dualstack
part to be ipv4 only compatible.
- text/x-diff attachment: curl_ftpport_range_diff_20090425.diff