Discussion:
CCC and RFC4217 compliance?
Ray Van Dolson
2010-02-18 01:27:40 UTC
Permalink
lftp v4.0.4.

In attempting to connect to a ProFTPD server using CCC (ftp:ssl-use-ccc
set to true), I get an issue corresponding with this one[1].

It sounds like lftp doesn't properly support a bi-directional SSL
shutdown when CCC is in use as described in RFC4217 section 12.3. Is
this the case?

I've tested a few other FTP clients (CoreFTP namely) which don't
exhibit this issue when connecting to my ProFTPD server using CCC.

I'm curious if the lftp devs consider this a "bug" or not. I know CCC
implementations vary and there's some gray area in the RFC as to how
the shutdowns should be implemented...

Ray

[1] http://bugs.proftpd.org/show_bug.cgi?id=2994
Alexander V. Lukyanov
2010-02-18 14:40:46 UTC
Permalink
Post by Ray Van Dolson
It sounds like lftp doesn't properly support a bi-directional SSL
shutdown when CCC is in use as described in RFC4217 section 12.3. Is
this the case?
Would this patch fix the problem? I have no server to test this on.

Index: ftpclass.cc
===================================================================
RCS file: /home/lav/cvsroot/lftp/src/ftpclass.cc,v
retrieving revision 1.461
diff -u -p -r1.461 ftpclass.cc
--- ftpclass.cc 15 Sep 2009 07:56:30 -0000 1.461
+++ ftpclass.cc 18 Feb 2010 14:27:29 -0000
@@ -4136,6 +4148,7 @@ void Ftp::CheckResp(int act)
case Expect::CCC:
if(is2XX(act))
{
+ conn->control_send->PutEOF();
state=WAITING_CCC_SHUTDOWN;
conn->waiting_ssl_timer.Reset();
}

--
Alexander.
Ray Van Dolson
2010-02-18 17:23:48 UTC
Permalink
Post by Alexander V. Lukyanov
Post by Ray Van Dolson
It sounds like lftp doesn't properly support a bi-directional SSL
shutdown when CCC is in use as described in RFC4217 section 12.3. Is
this the case?
Would this patch fix the problem? I have no server to test this on.
Index: ftpclass.cc
===================================================================
RCS file: /home/lav/cvsroot/lftp/src/ftpclass.cc,v
retrieving revision 1.461
diff -u -p -r1.461 ftpclass.cc
--- ftpclass.cc 15 Sep 2009 07:56:30 -0000 1.461
+++ ftpclass.cc 18 Feb 2010 14:27:29 -0000
@@ -4136,6 +4148,7 @@ void Ftp::CheckResp(int act)
if(is2XX(act))
{
+ conn->control_send->PutEOF();
state=WAITING_CCC_SHUTDOWN;
conn->waiting_ssl_timer.Reset();
}
That does seem to work.... still testing, but so far so good.

(Tested against lftp 3.7.14 w/ Fedora 11)

Ray
Ray Van Dolson
2010-02-18 17:59:24 UTC
Permalink
Post by Ray Van Dolson
Post by Alexander V. Lukyanov
Post by Ray Van Dolson
It sounds like lftp doesn't properly support a bi-directional SSL
shutdown when CCC is in use as described in RFC4217 section 12.3. Is
this the case?
Would this patch fix the problem? I have no server to test this on.
Index: ftpclass.cc
===================================================================
RCS file: /home/lav/cvsroot/lftp/src/ftpclass.cc,v
retrieving revision 1.461
diff -u -p -r1.461 ftpclass.cc
--- ftpclass.cc 15 Sep 2009 07:56:30 -0000 1.461
+++ ftpclass.cc 18 Feb 2010 14:27:29 -0000
@@ -4136,6 +4148,7 @@ void Ftp::CheckResp(int act)
if(is2XX(act))
{
+ conn->control_send->PutEOF();
state=WAITING_CCC_SHUTDOWN;
conn->waiting_ssl_timer.Reset();
}
That does seem to work.... still testing, but so far so good.
(Tested against lftp 3.7.14 w/ Fedora 11)
Also works with lftp 3.7.11 on RHEL 5.4. These tests are all being
done against a ProFTPD 1.3.1 server with mod_tls enabled.

Ray

Loading...