cURL / Mailing Lists / curl-library / Single Mail


[PATCH] Active Mode FTPS Data Port Range

From: <>
Date: Sat, 25 Apr 2009 05:19:51 +0200

Daniel Stenberg wrote:
> The TODO mention:
> 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
ipv6 format.

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.

errors like
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.


Received on 2009-04-25