On Wed, Dec 20, 2000 at 12:27:51PM +0100, Dr. Michael Meskes wrote:
> When lftp sends the passive command and gets the passive reply in return
> listing my firewall's IP number plus a port. Now lftp tries to connect to
> that port on ftp.debian.org instead of the firewall, i.e. it ignores the IP
> number send and tries to connect to the host I originally told it to.
>
> I'm not an expert of the FTP protocol but the way I read the RFC this is a
> bug. Or did I miss something?
Try this patch:
--- ftpclass.cc 2000/12/18 10:08:36
+++ ftpclass.cc 2000/12/20 11:36:16
@@ -629,7 +629,8 @@
p[0]=p0; p[1]=p1;
if((a0==0 && a1==0 && a2==0 && a3==0)
- || (InPrivateNetwork(&data_sa) && !InPrivateNetwork(&peer_sa)))
+ || ((bool)Query("fix-pasv-address",hostname)
+ && InPrivateNetwork(&data_sa) && !InPrivateNetwork(&peer_sa)))
{
// broken server, try to fix up
fixed_pasv=true;
--- resource.cc 2000/12/01 10:52:30
+++ resource.cc 2000/12/20 11:37:01
@@ -107,6 +107,7 @@
ResDecl01 ("ftp:anon-user", "anonymous",0,0),
ResDecl01a("ftp:auto-sync-mode", "", ResMgr::ERegExpValidate,0),
ResDecl01b("ftp:bind-data-socket", "yes", ResMgr::BoolValidate,0),
+ ResDecl01c("ftp:fix-pasv-address", "no", ResMgr::BoolValidate,0),
ResDecl02 ("ftp:fxp-passive-source", "no",
ResMgr::BoolValidate,ResMgr::NoClosure),
ResDecl03 ("ftp:list-options", "", 0,0),
ResDecl04 ("ftp:nop-interval", "120", ResMgr::UNumberValidate,0),
--
Alexander.