When establishing the client's IP address, the
FtpDataSocket class relies on
InetAddress.getLocalHost().getHostAddress()
This in general returns the loopback interface address
(172.0.0.1). Which, when transmitted to the FTP server
in the PORT command, is considered invalid (except in
the case where the server is running in the same server
as the client).
This patch adds a "getLocalHostAddress" function to the
FtpDataSocket class that tries to obtain a non loopback
interface address by looping throught the client's
configured network addresses.
I also added a checkbox to the client application to
enable the users to specify they intend to use Active
data connections.
The major disadvantage with this patch is that it
relies on the NetworkInterface class, which is only
available with J2SE 1.4. For this reason I only added
the aformentioned checkbox to the Swing client UI.
This patch was taken by using cvs diff -uN agains a checkout of the project on 03/07/04