How does WinSCP determine whether to issue PASV or EPSV?
I recently had a WinSCP script that issues a "Synchronize Remote" command fail. (The script had been working for months.) The log shows the server responding to an MLSD command with "Could not retrieve directory listing". This had worked until a couple weeks ago. The only difference that I could see between the succeeding and failing flows was that WinSCP issued an EPSV command just prior to the MLSD command. In the past it issued a PASV command.
After reading that Extended PASV supports IPv6 while PASV supports only IPv4 so I disabled IPv6 on the FTP server and the script runs again. The server has supported IPv6 since before I created the script but recent maintenance changed something (obviously). I can see nothing in the logged exchange that would tell WinSCP to use EPSV. I can't confirm this right (since the Synchronize is running now and will continue for several hours) but I'm pretty sure the original control connection was IPv4. What tells WinSCP that a server supports IPv6 connections?
After reading that Extended PASV supports IPv6 while PASV supports only IPv4 so I disabled IPv6 on the FTP server and the script runs again. The server has supported IPv6 since before I created the script but recent maintenance changed something (obviously). I can see nothing in the logged exchange that would tell WinSCP to use EPSV. I can't confirm this right (since the Synchronize is running now and will continue for several hours) but I'm pretty sure the original control connection was IPv4. What tells WinSCP that a server supports IPv6 connections?