Index: curl-7.65.3/docs/cmdline-opts/ftp-skip-pasv-ip.d =================================================================== --- curl-7.65.3.orig/docs/cmdline-opts/ftp-skip-pasv-ip.d 2019-03-25 16:42:46.000000000 +0800 +++ curl-7.65.3/docs/cmdline-opts/ftp-skip-pasv-ip.d 2021-01-07 17:59:27.830166640 +0800 @@ -9,4 +9,6 @@ will re-use the same IP address it already uses for the control connection. +Since curl 7.74.0 this option is enabled by default. + This option has no effect if PORT, EPRT or EPSV is used instead of PASV. Index: curl-7.65.3/docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.3 =================================================================== --- curl-7.65.3.orig/docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.3 2019-07-19 17:37:58.000000000 +0800 +++ curl-7.65.3/docs/libcurl/opts/CURLOPT_FTP_SKIP_PASV_IP.3 2021-01-07 18:01:01.746166640 +0800 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -36,11 +36,13 @@ number from the 227-response. This option thus allows libcurl to work around broken server installations -that due to NATs, firewalls or incompetence report the wrong IP address back. +that due to NATs, firewalls or incompetence report the wrong IP address +back. Setting the option also reduces the risk for various sorts of client +abuse by malicious servers. This option has no effect if PORT, EPRT or EPSV is used instead of PASV. .SH DEFAULT -0 +1 since 7.74.0, was 0 before then. .SH PROTOCOLS FTP .SH EXAMPLE Index: curl-7.65.3/lib/url.c =================================================================== --- curl-7.65.3.orig/lib/url.c 2021-01-07 17:46:49.701046576 +0800 +++ curl-7.65.3/lib/url.c 2021-01-07 18:01:34.270166640 +0800 @@ -447,6 +447,7 @@ set->ftp_use_eprt = TRUE; /* FTP defaults to EPRT operations */ set->ftp_use_pret = FALSE; /* mainly useful for drftpd servers */ set->ftp_filemethod = FTPFILE_MULTICWD; + set->ftp_skip_ip = TRUE; /* skip PASV IP by default */ #endif set->dns_cache_timeout = 60; /* Timeout every 60 seconds by default */ Index: curl-7.65.3/src/tool_cfgable.c =================================================================== --- curl-7.65.3.orig/src/tool_cfgable.c 2019-06-13 16:52:34.000000000 +0800 +++ curl-7.65.3/src/tool_cfgable.c 2021-01-07 18:01:59.810166640 +0800 @@ -44,6 +44,7 @@ config->tcp_nodelay = TRUE; /* enabled by default */ config->happy_eyeballs_timeout_ms = CURL_HET_DEFAULT; config->http09_allowed = TRUE; + config->ftp_skip_ip = TRUE; } static void free_config_fields(struct OperationConfig *config)