[En-Nut-Discussion] FTP server support

Philipp Burch phip at hb9etc.ch
Wed Nov 26 22:32:39 CET 2014


Hi Ole!

On 25.11.2014 15:08, Ole Reinhardt wrote:
> Hi Philipp,
> 
> Am 25.11.2014 11:37, schrieb Philipp Burch:
>> [...]
> 
> Unfortunately passive mode is completely broken in the FTP
> implementation. Passive mode needs a listening socket to be opened right
> in the moment, when the port number has been negotiated. Unfortunately
> our passive mode implementation openes the listening socket at some
> later (and wrong) stage?!?
> 
> I just asked on the mailinglist some time ago, if someone just
> implemented a working passive mode, but it looks like nobody had...
> 
> Unfortunately I have not had yet the time to fix it by myself.
> 
> Any help here is very welcome!

Passive mode is now implemented/fixed in r5915 in the devnut_tiva
branch. It relies on the extended socket API described in the other
thread, however.

devnut_tiva$ svn commit -m 'Fixed passive mode for the FTP server. When
the client issues PASV prior to a data transfer, a listening socket is
opened in non-blocking mode to allow the client to connect. The data
transfer is then done using this socket, which is closed afterwards with
resetting the passive mode flag. This means that passive mode is used
only for the data transfer right after the PASV command. FTP clients
seem to respect this behaviour by sending PASV before LIST, STOR and
RETR. Tested with the Linux ftp program and the Firefox FireFTP add-on.'
Sending        nut/pro/ftpd.c
Transmitting file data .
Committed revision 5915.

Cheers,
Philipp


More information about the En-Nut-Discussion mailing list