1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

FTP: if EPSV fails on IPV6 connections, bail out

... instead of trying PASV, since PASV can't work with IPv6.

Reported-by: Vojtěch Král
This commit is contained in:
Daniel Stenberg 2015-01-08 20:43:32 +01:00
parent 9a452ba3a1
commit 99e71e6a84

View File

@ -1815,6 +1815,13 @@ static CURLcode ftp_state_quote(struct connectdata *conn,
static CURLcode ftp_epsv_disable(struct connectdata *conn)
{
CURLcode result = CURLE_OK;
if(conn->bits.ipv6) {
/* We can't disable EPSV when doing IPv6, so this is instead a fail */
failf(conn->data, "Failed EPSV attempt, exiting\n");
return CURLE_FTP_WEIRD_SERVER_REPLY;
}
infof(conn->data, "Failed EPSV attempt. Disabling EPSV\n");
/* disable it for next transfer */
conn->bits.ftp_use_epsv = FALSE;